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!

GroupBox Constructor

Initializes a new instance of the GroupBox class.

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

Example [Visual Basic]

The following example instantiates a GroupBox on a form and adds two RadioButton controls to it.

[Visual Basic]

' Instantiate a GroupBox and two RadioButtons.
Private GroupBox1 As System.WinForms.GroupBox
Private RadioButton1 As System.WinForms.RadioButton
Private RadioButton2 As System.WinForms.RadioButton

Private Sub MySub()
   '
   ' Initialize the GroupBox and RadioButtons.
   Form1.GroupBox1 = New System.WinForms.GroupBox 
   Form1.RadioButton1 = New System.WinForms.RadioButton
   Form1.RadioButton2 = New System.WinForms.RadioButton

   ' Add the RadioButtons to the GroupBox.
   GroupBox1.Controls.Add(RadioButton1)
   GroupBox1.Controls.Add(RadioButton2)

   ' Add the GroupBox to the Form.
   Form1.Controls.Add(GroupBox1)
End Sub

See Also

GroupBox Class | GroupBox Members | System.WinForms Namespace