Gets or sets a value indicating whether the form will receive key events before the event is passed to the control that has focus.
Documentation for this section has not yet been entered.
When this property is set to true, the form will receive all Control.KeyPress, Control.KeyDown, and Control.KeyUp events. After the form's event handlers have completed processing the keystroke, the keystroke is then assigned to the control with focus. For example, if the Form.KeyPreview property is set to true and the currently selected control is a System.Windows.Forms.TextBox, after the keystroke is handled by the event handlers of the form the System.Windows.Forms.TextBox control will receive the key that was pressed. To handle keyboard events only at the form level and not allow controls to receive keyboard events, set the KeyPressEventArgs.Handled property in your form's Control.KeyPress event handler to true.
You can use this property to process most keystrokes in your application and either handle the keystroke or call the appropriate control to handle the keystroke. For example, when an application uses function keys, you might want to process the keystrokes at the form level rather than writing code for each control that might receive keystroke events.
If a form has no visible or enabled controls, it automatically receives all keyboard events.
A control on a form may be programmed to cancel any keystrokes it receives. Since the control never sends these keystrokes to the form, the form will never see them regardless of the setting of Form.KeyPreview.