Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Decoding INKEY() into something human readable...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00109676
Message ID:
00109740
Vues:
22
Hi David,

You do not need to use the INKEY() here. The KeyPress() method of a control receives the status of Shift, Alt and Control as one parameter and the ASC value of key pressed by the user as the second parameter.

After decoding the key you could have something like...
TextBox.Value = 'SHIFT+'CHR(nKeyCode)
NODEFAULT
>I've got some complicated keystrokes that I'de like to display to the user in a readable format.
>
>In the help page for INKEY() function there is a table of keycodes that are returned by INKEY() and KeyPress() functions. Does anyone know of a procedure to convert the KeyCode and Modifier (Shift,Ctrl,Alt) into human readable form of the key pressed? (Or do I get to roll my own?)
>
>An example of the functionality i'de like to duplicate is in MS Word, if you go to the View->Toolbars->Customize menu option then click on the "Keyboard" button a screen comes up where you can specify shortcuts. Put your cursor in the textbox below the "Press new shortcut key" label and then hit something like "Ctrl+Alt+D". The program records the keystroke and stuffs "CTRL+ALT+D" into the textbox.
>
>Any ideas?
>
>-- Dave
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform