Gets or sets the state of the CheckBox.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
If the ThreeState property is set to false, the property value can only be set to CheckState.Indeterminate in code and not by user interaction.
The CheckBox displays a check mark.
The control appears sunken.
The CheckBox is empty.
The control appears raised.
The CheckBox displays a check mark and is shaded.
The control appears flat.
The following code example displays the values of three properties in a label. The ThreeState property alternates between true and false with alternating clicks of the control and the CheckAlign alternates between the MiddleRight and MiddleLeft values of System.Drawing.ContentAlignment. This example shows how the property values change as the ThreeState property changes and the control is checked. This example requires that a CheckBox, Label and Button have all been instantiated on a form and that the label is large enough to display three lines of text, as well as a reference to the System.Drawing namespace. This code should be called in the Click event handler of the control.
Available since 1.1