Examples and codes to deal with Api functions
Know the coordinates of the mouse inside and outside the formic
Private Declare Function GetCursorPos Lib "user32" (lpPoint As _
POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Dim a As POINTAPI
Dim b As Long
Dim c As Long
' add labels and timer control in the form
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
mousepos
End Sub
Private Sub mousepos()
ret = GetCursorPos(a)
b = a.x
c = a.y
Label1.Caption = b
Label2.Caption = c
End Sub
Interpreter and redeployed from vb4arb
0 التعليقات:
إرسال تعليق