Subscribe For Free Updates!

We'll not spam mate! We promise.

الاثنين، 7 يوليو 2014

visual basic code Know the coordinates of the mouse inside and outside the form

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

Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 التعليقات:

إرسال تعليق