KeyPress Event
Use the KeyPress event to test keystrokes for validity or to format characters as they are typed.
object_KeyPress (KeyAscii As Integer)
Arguments
KeyAscii is an integer representing an ANSI key code. KeyAscii is passed by reference; changing it sends a different character to the control. Changing KeyAscii to 0 cancels the keystroke so the control receives no character.
Event applies to TDBList and TDBCombo controls.
The KeyPress event occurs when the user presses and releases one of the following kinds of keys:
· A printable keyboard character.
· The Ctrl key combined with an alphabetic or special character.
· The Enter or Backspace key.
See Also