March 2003
Intermediate to advanced
896 pages
32h 35m
English
KeyPressEventArgs
Similar to the KeyEventArgs, this class
encapsulates the data for the Control.KeyPress
event.
You can simply retrieve the KeyChar corresponding
to the key that was pressed. For example, pressing Shift-H would
provide H, whereas pressing H would return h (of course, the Caps
Lock key would change this).
public class KeyPressEventArgs : EventArgs { // Public Constructors public KeyPressEventArgs(char keyChar); // Public Instance Properties public bool Handled{set; get; } public char KeyChar{get; } }
System.Object
→ System.EventArgs → KeyPressEventArgs
Control.OnKeyPress(),
KeyPressEventHandler.{BeginInvoke(),
Invoke()}, UpDownBase.OnTextBoxKeyPress()
Read now
Unlock full access