Article ID: 140296
Article Last Modified on 8/17/1999
CheckBox, ComboBox, CommandButton, EditBox, Form, ListBox, OptionButton, Spinner, TextBox
Key Alone Shift Ctrl Alt ------------------------------------ F1 28 84 94 104 F2 -1 85 95 105 F3 -2 86 96 106 F4 -3 87 97 107 F5 -4 88 98 108 F6 -5 89 99 109 F7 -6 90 100 110 F8 -7 91 101 111 F9 -8 92 102 112 F10 -9 93 103 113 F11 133 135 137 139 F12 134 136 138 140For more information on key values, refer to the INKEY() function in Visual FoxPro Help file.
LPARAMETERS nKeyCode, nShiftAltCtrl
*: The previous line of code is already contained in the KeyPress event
*: by default.
DO CASE
CASE nKeyCode = 28
WAIT WINDOW "The F1 Key has been pressed" NOWAIT
mykey = "F1 Key"
ThisForm.Refresh
CASE nKeyCode = -4
WAIT WINDOW "The F5 Key has been pressed" NOWAIT
mykey = "F5 Key"
ThisForm.Refresh
ENDCASE
CLEAR MACROS SET HELP OFF *: This will disable FoxPro's default function key assignments.
RESTORE MACROS SET HELP ON *: This will restore FoxPro's default function key assignments.
ThisForm.Release
Additional query words: VFoxWin
Keywords: kbcode KB140296