Solved

Mouse position

Posted on 1998-07-27
5
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Suggested Courses
Course of the Month4 days, 1 hour left to enroll

630 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