Initializes a new instance of the CheckBox class.
[Visual Basic] Public Sub New() [C#] public CheckBox(); [C++] public: CheckBox(); [JScript] public function CheckBox();
By default, when a new CheckBox is instantiated, AutoCheck is set to true, Checked is set to false and Appearance is set to Normal.
The following example instantiates a CheckBox, gives it the appearance of a toggle button and sets AutoCheck to false.
[Visual Basic]
' Instantiate a CheckBox. Private CheckBox1 As System.WinForms.CheckBox Private Sub MySub() ' Initialize a new CheckBox. Form1.CheckBox1 = New System.WinForms.CheckBox ' Make the checkbox control appear as a toggle button. CheckBox1.Appearance = Appearance.Button ' Turn off the update of the display on the click of the control. CheckBox1.AutoCheck = False ' Add the check box control to the form. Form1.Controls.Add(CheckBox1) End Sub
CheckBox Class | CheckBox Members | System.WinForms Namespace | CheckBox