Essaie ça:
Private Declare Function GetCursorPos Lib "user32" ( _
lpPoint As PointAPI) As Long
Private Type PointAPI
x As Long
y As Long
End Type
Private Sub Form_Load()
Me.Timer1.Interval = 10
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub Timer1_Timer()
Dim Tampon As PointAPI
GetCursorPos Tampon
Me.Caption = "Position : " & Tampon.x & "-" & Tampon.y
End Sub
One step away from ...
|