System.Windows.Forms.Control.GetStyle Method

Retrieves the value of the specified control style bit for the control.

Syntax

protected bool GetStyle (ControlStyles flag)

Parameters

flag
The System.Windows.Forms.ControlStyles bit to return the value from.

Returns

true if the specified control style bit is set to true; otherwise, false.

Remarks

Control style bit flags are used to categorize supported behavior. A control can enable a style by calling the Control.SetStyle(ControlStyles, bool) method and passing in the appropriate System.Windows.Forms.ControlStyles bit and the Boolean value to set the bit to. To determine the value assigned to a specified System.Windows.Forms.ControlStyles bit, use the Control.GetStyle(ControlStyles) method and pass in the System.Windows.Forms.ControlStyles member to evaluate.

Requirements

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