NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

CheckBox Constructor

Initializes a new instance of the CheckBox class.

[Visual Basic]
Public Sub New()
[C#]
public CheckBox();
[C++]
public: CheckBox();
[JScript]
public function CheckBox();

Remarks

By default, when a new CheckBox is instantiated, AutoCheck is set to true, Checked is set to false and Appearance is set to Normal.

Example [Visual Basic]

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

See Also

CheckBox Class | CheckBox Members | System.WinForms Namespace | CheckBox