System.Windows.Forms.Control.ContainsFocus Property

Gets a value indicating whether the control, or one of its child controls, currently has the input focus.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
public bool ContainsFocus { get; }

Value

Documentation for this section has not yet been entered.

Remarks

You can use this property to determine whether a control or any of the controls contained within it has the input focus. To determine whether the control has focus, regardless of whether any of its child controls have focus, use the Control.Focused property. To give a control the input focus, use the Control.Focus or Control.Select methods.

Requirements

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