1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As _
Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Declare Function SetKeyboardState Lib "user32" (lppbKeyState As Byte) _
As Long
Private Const KEYEVENTF_EXTENDEDKEY = &H1
Private Const KEYEVENTF_KEYUP = &H2
Sub EnVoiCrtLMoins()
'Actionne touche Controle
keybd_event vbKeyControl, 0, KEYEVENTF_EXTENDEDKEY, 0
'Actionne touche - du pavé numérique
keybd_event 109, 0, 0, 0
'Relache touche - du pavé numérique
keybd_event 109, 0, KEYEVENTF_KEYUP, 0
'Relache la touche controle
keybd_event vbKeyControl, 0, KEYEVENTF_KEYUP, 0
End Sub |