Bonjour,

je cherche à neutraliser les touches windows, d'accès au menu Démarrer. En consultant votre forum je suis arrivé à ceci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
Il s'avère que cela fonctionne mais si on appuie plusieurs fois rapidement sur la touche Windows, le menu Démarrer clignote quelques instants, et ensuite la touche n'est plus neutralisée.
Comment puis-je y remédier ? merci