Coordonnées du curseur

cs_psychodingue Messages postés 67 Date d'inscription samedi 5 janvier 2002 Statut Membre Dernière intervention 2 juin 2005 - 9 avril 2002 à 02:20
Neo.balastik Messages postés 796 Date d'inscription jeudi 17 mai 2001 Statut Membre Dernière intervention 5 mai 2009 - 9 avril 2002 à 08:37
comment je peux faire pour trouver la position du curseur?
merci
@+

1 réponse

Neo.balastik Messages postés 796 Date d'inscription jeudi 17 mai 2001 Statut Membre Dernière intervention 5 mai 2009 7
9 avril 2002 à 08:37
Salut,

Un bout de code qui permet cela:

Private Type POINTAPI
X As Long
Y As Long
End Type

'Declare the API-Functions
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long

'Quelque part dans le code
Dim Point As POINTAPI

GetCursorPos Point

MsgBox "Coord X: " & Point.X & " Coord Y: " & Point.Y

Tchao

NéoB
0
Rejoignez-nous