Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
KEYPRESS - EVENT (Trapping Alt or Ctrl)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00121615
Message ID:
00121763
Vues:
15
Wayne,

I dropped a textbox onto a form, put this code as it's KeyPress:

LPARAMETERS nKeyCode, nShiftAltCtrl
debugout debstr( program(), nkeycode, nShiftAltCtrl )

debstr() is available on my website, it basically turns all the args to character so it can be sent to debugout.

Open the debugger Output window and watch (it's much easier to see what's happening than in WAIT WINDOWs). As keys are pressed you see the codes. Ctrl-K shows up ok, but Ctrl-A doesn't show up because the menu shortcut for select all fires off. Alt-G shows up but Alt-F won't because that's the File menu item. So it really depends on what menu you have in place at the time.

>I simply placed a textbox on a form and placed code to fire a WAIT WINDOW when a key was pressed in the KEYPRESS event. If you press anything without the Alt or Ctrl, the event does fire. But, when you press the Alt or Ctrl, the event does not fire.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform