event KeyPress (KeyAscii as Integer)

Occurs when the user presses and releases an ANSI key.

 TypeDescription 
   KeyAscii as Integer An integer that returns a standard numeric ANSI keycode.  

The KeyPress event lets you immediately test keystrokes for validity or for formatting characters as they are typed. Changing the value of the keyascii argument changes the character displayed. Use KeyDown and KeyUp event procedures to handle any keystroke not recognized by KeyPress, such as function keys, editing keys, navigation keys, and any combinations of these with keyboard modifiers. Unlike the KeyDown and KeyUp events, KeyPress does not indicate the physical state of the keyboard; instead, it passes a character. KeyPress interprets the uppercase and lowercase of each character as separate key codes and, therefore, as two separate characters. The EditChange event notifies your application that the user alters the control's edit. Use the SelectionChanged event to notify your application that the user changes the selected item. Use the EditText property to determine the text of the edit control.


Send comments on this topic.
© 1999-2008 Exontrol Inc, Software. All rights reserved.