System.Windows.Forms.Control.Validated Event

Occurs when the control is finished validating.

Syntax

public event EventHandler Validated

Remarks

When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the Control.Select or Control.SelectNextControl(Control, bool, bool, bool, bool) methods, or by setting the ContainerControl.ActiveControl property to the current form, focus events occur in the following order:

[The 'ordered' type of list has not been implemented in the ECMA stylesheet.]

When you change the focus by using the mouse or by calling the Control.Focus method, focus events occur in the following order:

[The 'ordered' type of list has not been implemented in the ECMA stylesheet.]

If the Control.CausesValidation property is set to false, the Control.Validating and Control.Validated events are suppressed.

If the System.ComponentModel.CancelEventArgs.Cancel property of the System.ComponentModel.CancelEventArgs is set to true in the Control.Validating event delegate, all events that would usually occur after the Control.Validating event are suppressed.

Note:

Do not attempt to set focus from within the Control.Enter, Control.GotFocus, Control.Leave, Control.LostFocus, Control.Validating, or Control.Validated event handlers. Doing so can cause your application or the operating system to stop responding. For more information, see the WM_KILLFOCUS topic in the "Keyboard Input Reference" section, and the "Message Deadlocks" section of the "About Messages and Message Queues" topic in the MSDN library at http://msdn.microsoft.com/library.

For more information about handling events, see Consuming Events.

Requirements

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