How do I make the mouse move in steps of some pixels so that it moves only over the grid drawn on the picture?
Printable View
How do I make the mouse move in steps of some pixels so that it moves only over the grid drawn on the picture?
You could try Setcursorpos and getcursorpos API
Can you please supply me the code. It would be very helpful to me.
Thanks.
Kinjal
Can you please supply me the code since I dont have any resources (like MSDN or any Books) to find out the syntax required for the Setcursorpos and getcursorpos API. My grid points are at 150 pixels apart an I want the mouse cursor to only move on these grid points.
Thanks
Kinjal
Well you could try a little by yourself ;)Code:Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Long, ByVal y As Long) As Long
Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
Type POINTAPI
x As Long
y As Long
End Type