Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trap MouseDown or KeyPress using windows API?
Message
De
24/01/2002 21:30:26
 
 
À
17/01/2002 09:23:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00606044
Message ID:
00610253
Vues:
20
Tim, I asked for help on resolving ambiguous keystrokes in the keypress event and received this reply from Gerry Schmitz:



Check out the GetAsyncKeyState() Windows API function.

Use it in your .KeyPress() event to test the state of individual keys; eg.
DECLARE SHORT GetAsyncKeyState IN USER32.DLL ;
   INTEGER vKey

#define VK_SHIFT          0x10
#define VK_F2             0x71

IF  BITTEST( GetAsyncKeyState( VK_SHIFT ), 31 ) = .T. ;
AND BITTEST( GetAsyncKeyState( VK_F2    ), 31 ) = .T.
   ...
ENDIF
Perhaps this will apply to your situation.

Peter
Peter Robinson ** Rodes Design ** Virginia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform