1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Private Declare Sub keybd Lib "user32" Alias "keybd_event" _
(ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)
'simulation d'un appui sur une touche
Private Sub Appui_touche(T As Long)
'appuie sur la touche
keybd T, 0, 0, 0
'relache la touche
keybd T, 0, 2, 0
End Sub
'neutralisation des touches windows
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'touche windows gauche =91 touche windows droite =92
If KeyCode = 91 Or KeyCode = 92 Then
Appui_touche (92)
End If
End Sub |
Partager