Add two labels, Name them "label1" and label2" Now add a timer control and set its interval to 1.
Use the following code now:
Code:
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Dim pos As POINTAPI
Private Sub Timer1_Timer()
GetCursorPos pos
Label1.Caption = "X:" & pos.x
Label2.Caption = "Y:" & pos.y
End Sub