KeyPress Event
Description
Occurs when the user presses and releases an ANSI key.
Syntax
Public Event KeyPress( _
ByRef KeyAscii As Integer _
)
Parameters
- KeyAscii: An integer that returns a standard numeric ANSI keycode. KeyAscii is passed by reference; changing it sends a different character to the object. Changing KeyAscii to 0 cancels the keystroke so the object receives no character.
Remarks
The KeyPress event can involve any printable keyboard character, the CTRL key combined with a character from the standard alphabet, or one of a few special characters, and the ENTER or BACKSPACE key. A KeyPress event procedure is useful for intercepting keystrokes entered in a TextBox or ComboBox control. It enables you to immediately test keystrokes for validity or to format characters as they're typed. Changing the value of the KeyAscii argument changes the character displayed.
See Also
| Suite Pro Controls ActiveX Control v24.0
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.