Connaitre pos souris sur l'écran

Fabiin - 31 déc. 2000 à 16:45
 Int19h - 31 déc. 2000 à 18:01
Bonjour.
Comment dois-je faire pour connaitre la position de la souris sur l'écran.
Merci

1 réponse

Utiliser la fonction API : GetCursorPos :

Dans General Declaration :
Private Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x as Long
y as Long
End Type

Dans le Code :
Dim Pos as pointApi
GetCursorPos Pos

' Pour avoir x et y en Pixel :
x = Pos.x
y = Pos.y

That's all . Bon Reveillon
0
Rejoignez-nous