J'ai trouvé ce code sur internet pour renvoyer la position de la souris :
' Exemple proposé par int19h (Int19h@caramail.com)
' Placer un Timer sur la form, puis le code suivant :
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()
Timer1.Interval = 100
End Sub
Private Sub Timer1_Timer()
Dim Tampon As PointAPI
GetCursorPos Tampon
Form1.Caption = "Mouse Position : " & Tampon.x & "-" & Tampon.y
End Sub
Comment fait on pour "Placer un Timer sur la form"