Occurs when a character. space or backspace key is pressed while the control has focus.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Key events occur in the following order:
Use the KeyChar property to sample keystrokes at run time and to consume or modify a subset of common keystrokes.
To handle keyboard events only at the form level and not enable other controls to receive keyboard events, set the KeyPressEventArgs.Handled property in your form's event-handling method to true.
For more information about handling events, see Handling and Raising Events.