Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Mouse position

Posted on 1998-07-27
5
Medium Priority
?
227 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 100 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

916 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