-->![Vfp Vfp](/uploads/1/1/9/8/119877333/334627432.jpg)
![Inkey Inkey](/uploads/1/1/9/8/119877333/652080588.png)
It generally won't fire until VFP enters a wait state. A wait state is anything that waits for user input - inkey, displaying a browse window, editing data, etc., pretty much anything where the app is waiting for the user to do something - which is probably 99.999% of the time. Inkey working strangely on Compaqs. Trapping keystrokes w/ INKEY 6. Print 1 line, INKEY delay in Foxpro 2.5b for Windows. Substitute for INKEY? FPW 2.6: Need cursor in text box while using INKEY 9. Help says INKEY can detect double click??? Strange behaviour INKEY(0) after ON SHUTDOWN. Alternative to sluggish.
This article describes how to use KeyPress Event for form controls.
OpenSSL Examples for Visual FoxPro. Duplicate openssl dgst -sha256 -sign private.pem -out sha256.sig in.dat; Duplicate openssl dgst -sha256 -verify pubKey.pem -signature signature.sig in.dat; Duplicate openssl rsautl -sign -in small.dat -inkey private.pem -out rsautl.sig.
![Vfp Vfp](/uploads/1/1/9/8/119877333/334627432.jpg)
Original product version: Visual FoxPro
Original KB number: 140296
Original KB number: 140296
Summary
Many developers use ON KEY LABEL to assign programs or procedures within programs that are to be executed upon pressing a specific key (usually a function key). However, if the ON KEY LABEL assignment is to be specific to a control within a form, a better alternative would be to use the KeyPress event of that control.
More information
The KeyPress event is available for the following form controls:
CheckBox, ComboBox, CommandButton, EditBox, Form, ListBox, OptionButton, Spinner, TextBox
It is possible to use this event to check for the press of a specific key. When using the KeyPress event to perform an action based on a function key, the function key's value should be used as shown in this table:
Vfp9 Inkey
For more information on key values, see the
INKEY()
function in Visual FoxPro Help file.Inkey Products
Step-by-Step Example
The following steps show how to use the KeyPress event.
- Create a form, and place a text box on it.
- In the
ControlSource
property of the text box, type mykey (or any other variable that you might prefer). - Place the following code in the KeyPress event of the text box:
- Place the following code in the Load event of the form:
- Place the following code in the Destroy event of the form:
- Place a command button on the form, and place the following code in its click event:
- Save and run the form. If either the F1 or F5 key is pressed, the appropriate WAIT WINDOW messages should appear, and the text box should be updated.
Inkey Program
-->This article describes how to use KeyPress Event for form controls.
Original product version: Visual FoxPro
Original KB number: 140296
Original KB number: 140296
Summary
Many developers use ON KEY LABEL to assign programs or procedures within programs that are to be executed upon pressing a specific key (usually a function key). However, if the ON KEY LABEL assignment is to be specific to a control within a form, a better alternative would be to use the KeyPress event of that control.
Inkey Pms Download
![Inkey Inkey](/uploads/1/1/9/8/119877333/652080588.png)
More information
The KeyPress event is available for the following form controls:
CheckBox, ComboBox, CommandButton, EditBox, Form, ListBox, OptionButton, Spinner, TextBox
It is possible to use this event to check for the press of a specific key. When using the KeyPress event to perform an action based on a function key, the function key's value should be used as shown in this table:
For more information on key values, see the
INKEY()
function in Visual FoxPro Help file.Step-by-Step Example
The following steps show how to use the KeyPress event.
- Create a form, and place a text box on it.
- In the
ControlSource
property of the text box, type mykey (or any other variable that you might prefer). - Place the following code in the KeyPress event of the text box:
- Place the following code in the Load event of the form:
- Place the following code in the Destroy event of the form:
- Place a command button on the form, and place the following code in its click event:
- Save and run the form. If either the F1 or F5 key is pressed, the appropriate WAIT WINDOW messages should appear, and the text box should be updated.