System.Windows.Forms.KeyEventArgs.Handled Property

Gets or sets a value indicating whether the event was handled.

Syntax

public bool Handled { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

KeyEventArgs.Handled is implemented differently by different controls within Windows Forms. For controls like System.Windows.Forms.TextBox which subclass native Win32 controls, it is interpreted to mean that the key message should not be passed to the underlying native control. If you set Handled to true on a System.Windows.Forms.TextBox, that control will not pass the key press events to the underlying Win32 text box control, but it will still display the characters that the user typed.

If you want to prevent the current control from receiving a key press, use the KeyEventArgs.SuppressKeyPress property.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0