OrthoDocSoft
Programmer
Dear Folks,
Clapper62 provided a variation of the following in
thread222-1287592
But when I use this, setting the timer speed to about 5 seconds, I only get the X position, while the Y position is always "0" no matter where the pointer is on the screen. Does anyone see the problem as to why I don't get a correct Y position?
Thanks,
Ortho
"you cain't fix 'stupid'...
Clapper62 provided a variation of the following in
thread222-1287592
Code:
Private Type PointAPI
X As Long
Y As Long
End Type
Private Declare Function GetCursorPos Lib "user32" (lpPoint As PointAPI) As Long
Private Sub Mouse_Position(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim Pnt As PointAPI ' Declare a variable to use UDT
GetCursorPos Pnt ' Call The API
msgbox Pnt.X
msgbox Pnt.Y
End Sub
Private Sub Form_Timer()
Call Mouse_Position(1, 0, 0, 0)
End Sub
But when I use this, setting the timer speed to about 5 seconds, I only get the X position, while the Y position is always "0" no matter where the pointer is on the screen. Does anyone see the problem as to why I don't get a correct Y position?
Thanks,
Ortho
"you cain't fix 'stupid'...