|
-
May 17th, 2001, 09:10 PM
#1
Mouse position
PLease help!!!
Does anyone khow to get the mouse position (X,Y)?
Thanks in ADv
///////////////////////////////
MACMAK
///////////////////////////////
-
May 17th, 2001, 09:18 PM
#2
Re: Mouse position
check the mouse move event
Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
X & Y is the position
HTH
cksiow
http://vblib.virtualave.net - share our codes
-
May 17th, 2001, 09:22 PM
#3
Re: Mouse position
thank you!
but are ther any code to get ONLY a mouse position?
///////////////////////////////
MACMAK
///////////////////////////////
-
May 17th, 2001, 10:02 PM
#4
Re: Mouse position
check the GetMouseMovePointsEx API, it might help.
-
May 18th, 2001, 07:00 AM
#5
Re: Mouse position
Try the GetCursorPos() API function.
-
May 18th, 2001, 07:29 AM
#6
Re: Mouse position
The mouse event is activated only on form.
The Api shree suggested will get mouse everywhere on screen.
If you need an example, add a Bas module to your project
add this code:
module bas code:
Option Explicit
Public Declare Function GetCursorPos Lib "user32" (lpPoint As PointAPI) As Long
Public Type PointAPI
X As Long
Y As Long
End Type
form code:
'on top:
option explicit
Dim Coords As PointAPI
'where you need to get x and y:
GetCursorPos Coords 'getting position
Me.Caption = "Current Mouse Position: " & Coords.X & "," & Coords.Y 'showing
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|