Solved

Mouse position

Posted on 1998-07-27
5
217 Views
Last Modified: 2010-05-03
Can anyone tell me how to get the mouse position on the running form ?
0
Comment
Question by:Oki_Cobain
  • 3
  • 2
5 Comments
 

Accepted Solution

by:
wsanchez earned 50 total points
ID: 1466894
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
 

Author Comment

by:Oki_Cobain
ID: 1466895
How about an API call?
0
 

Expert Comment

by:wsanchez
ID: 1466896
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
 

Author Comment

by:Oki_Cobain
ID: 1466897
Thanks, man
0
 

Expert Comment

by:wsanchez
ID: 1466898
welcome
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question