cs_zaky
Messages postés7Date d'inscriptionlundi 13 mai 2002StatutMembreDernière intervention27 janvier 2003
-
13 mai 2002 à 19:26
cs_stephen
Messages postés2Date d'inscriptionvendredi 26 avril 2002StatutMembreDernière intervention16 mai 2002
-
16 mai 2002 à 10:56
Salut,
Pour une appli VB 6 standard, je recherche une fonction (API ou pas) qui me permette de détecter un click de souris et me renvoie la position de la souris relativement à une Form.
cs_Pyros
Messages postés23Date d'inscriptiondimanche 12 août 2001StatutMembreDernière intervention24 décembre 2003 13 mai 2002 à 21:07
tu cre un timer
Private Declare Function GetAsyncKeyState Lib "User32" (ByVal uAction As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Dim Pos As POINTAPI
Private Sub Timer_Timer() 'interval 100
Key = GetAsyncKeyState(i)
if i = 1 then msgbox "leftclick"
if i = 2 then msgbox "rightclick"
if i = 3 then msgbox "centerclick"
GetCursorPos Pos 'met les positions de la souris Position.Caption = Pos.x & " ; " & Pos.y 'affiche la pos
End Sub