VB program to find cursor position

Program show the working of API

Sample :

I can't show you complete code Directly so download full code from below .
Download the output  for the form (design).


Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long

Private Type POINTAPI
        x As Long
        y As Long
End Type


Private Sub Timer1_Timer()
    Dim cur As POINTAPI
    GetCursorPos cur
    Label1.Caption = "X=" & cur.x
    Label2.Caption = "y=" & cur.y
End Sub



Full Code :
Output(Api.exe)

Full code(Api.doc)

Full project(Api.zip)

*Note Full project require Visual Basic 6.0