728x90









GetCursorPos API는 마우스의 자표값을 알려주는 API이다.

Private Declare Function GetCursorPos Lib "user32.dll" (ByRef lpPoint As POINTAPI) As Long
Private Type POINTAPI
    x As Long
    y As Long
End Type

Private Sub Timer1_Timer() 'Timer1.Interval = 1
Static MP As POINTAPI
GetCursorPos MP
    Form1.Cls
    Print MP.x
    Print MP.y
End Sub

+ Recent posts