|
-
Feb 5th, 2000, 05:27 PM
#1
Thread Starter
Hyperactive Member
Hi,
Sure, I know how to detect where the mouse is when its over one of my forms, but how do I detect where it is when its just on the desktop or something? After detecting the position of the mouse, I would also like to move its position. Does anybody have any ideas?
Thanks
-
Feb 5th, 2000, 06:49 PM
#2
Addicted Member
you can use GetCursorPos to detect the position and SetCursorPos to change it.
both are winapis.
Public Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
Public Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Long, ByVal y As Long) As Long
Public Type POINTAPI
x As Long
y As Long
End Type
------------------
Razzle
ICQ#: 31429438
-
Feb 5th, 2000, 07:18 PM
#3
Thread Starter
Hyperactive Member
-
Feb 5th, 2000, 08:01 PM
#4
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
|