Help Me Please

Here's my code;


Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

If X 375 And X 375 And Y 750 And X 750 And Y 1125 And X 1125 And Y 1500 And X 1500 And Y < 1875 Then

Shape1.Left = 1440

Shape1.Top = 1440

End If


End Sub


I have a shape on the form so when the mouse moves the shape follows it. But I want the shape to move by jumps. Like a grid, the shape is a square. Is there a faster way to do this then the way above? Is so, let me know. Thanks!

-Joel


Comments

  • Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    If X 375 And X375 And Y750 And X750 And Y1125 And X1125 And Y1500 And X1500 And Y<1875 Then<br>
    Shape1.Left = 1440

    Shape1.Top = 1440

    End If


    End Sub





Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories