Mouse position

Can anyone tell me how to get the mouse position on the running form ?
Oki_CobainAsked:
Who is Participating?
 
wsanchezConnect With a Mentor Commented:
You can use the mousemove event.  The following is the syntax.

Private Sub Form_MouseMove(button As Integer, shift As Integer, x As Single, y As Single)

x and y are the coordinates of the mouse pointer. The x and y values are always expressed in terms of the coordinate system set by the ScaleHeight, ScaleWidth, ScaleLeft, and ScaleTop properties of the object.


0
 
Oki_CobainAuthor Commented:
How about an API call?
0
 
wsanchezCommented:
Try GetCursorPos.  You could view it using the API Text Viewer.  I haven't tried it yet but I guess it's the one you're looking for.
0
 
Oki_CobainAuthor Commented:
Thanks, man
0
 
wsanchezCommented:
welcome
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.