Hi there,
I am really stuck and i need help! I need to be able to move the mouse cursor using code or something... Please help!!!! I need to be able to move the cursor say from one side of the screen to the other...
Is this possible? Please help!
Printable View
Hi there,
I am really stuck and i need help! I need to be able to move the mouse cursor using code or something... Please help!!!! I need to be able to move the cursor say from one side of the screen to the other...
Is this possible? Please help!
you need to use the Get/Setcursorpos API, here's the declarations you need.
get cursor pos fills a variable of type pointAPI with the current mouse coords, SetCursorPos moves the mouse to a point on the screenCode:Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
Private Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Long, ByVal y As Long) As Long
The Coords are inpixels from the top left of the screen.
Hope this helps