Bonsoir. On peut utiliser le Sub keybd_event de l'API Windows
Dans Général - Déclarations :
Const VK_wingauche = &H5B Const VK_windroite = &H5C Const KEYEVENTF_KEYUP = &H2 Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
et si le bouton s'appelle Command1,
Private Sub Command1_Click() keybd_event VK_wingauche, 0, 0, 0 ' appui sur la touche Windows gauche keybd_event VK_wingauche, 0, KEYEVENTF_KEYUP, 0 ' relache la touche Windows gauche End Sub
------------------------------- Réponse au message : -------------------------------
> Comment simuler la pression de la touche windows gauche a partir d'un command button ??? > J'ai essayer avec sendkeys ça ne fonctionne pas. > Merci de votre aide
|