Solved

Mouse position

Posted on 1998-07-27
5
212 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
Comment Utility
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
Comment Utility
How about an API call?
0
 

Expert Comment

by:wsanchez
Comment Utility
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
Comment Utility
Thanks, man
0
 

Expert Comment

by:wsanchez
Comment Utility
welcome
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem to delete range 4 54
Window placement 17 64
vb6 programatically bring window to front 8 52
Paint/Redraw window while dragging 16 56
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now