Description: | Generated when a character key is pressed and passed to the control that has the focus. The event is not generated for non-character keys such as the function keys and the shift keys. The KeyPress and Key events are usually generated after the KeyDown event. If a key is pressed, and kept depressed, multiple KeyDown and KeyPress events are generated. To support special keystrokes, such as short-cuts, on the form, see the PreKeyUp event. | ||||
TreeView and | KeyDown events are not generated when a label is being edited. | ||||
Others | Event is not generated in the following cases:
Note that, if the KeyAscii parameter of the PreKeyPress event of the Form object is set to another character code just before the KeyPress event is generated, the KeyAscii parameter of the KeyPress event is the character code that was set in the PreKeyPress event. | ||||
Used in controls: | CheckBox ComboBox CommandButton DriveList | Edit FileList FolderList ListBox | ListView OptionButton ScrollBar Slider | Tab Table TextBox TreeView | |
Used in objects: | Form | ||||
Parameters: | 1. [VT_I4 - Index S9(9) COMP-5] 2. VT_I2 - KeyAscii S9(4) COMP-5 | ||||
Description of parameters: |
|