hhhp2004
salut,
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Dim etatLeft As Long
Dim etatRight As Long
Const VK_LBUTTON = 1
Const VK_RBUTTON = 2
Const VK_MBUTTON = 4
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
etatLeft = GetKeyState(VK_LBUTTON)
etatRight = GetKeyState(VK_RBUTTON)
If etatLeft < 0 Then
Label2.Caption = "Left"
Else
Label2.Caption = ""
End If
If etatRight < 0 Then
Label3.Caption = "Right"
Else
Label3.Caption = ""
End If
End Sub
pour les autres boutons je ne sais pas
joyeuses fetes