'把它们添加到父控件Form1的Controls集合中
Me.Controls.Add(TextBox1)
Me.Controls.Add(Label1)
'添加三个GroupBox控件
Dim GroupBox1 As New System.Windows.Forms.GroupBox
Dim GroupBox2 As New System.Windows.Forms.GroupBox
Dim GroupBox3 As New System.Windows.Forms.GroupBox
'GroupBox1
GroupBox1.BackColor = System.Drawing.SystemColors.Control
GroupBox1.Location = New System.Drawing.Point(8, 40)
GroupBox1.Name = "GroupBox1"
GroupBox1.Size = New System.Drawing.Size(96, 104)
GroupBox1.TabIndex = 3
GroupBox1.TabStop = False
GroupBox1.Text = "性别"
'GroupBox2
GroupBox2.Location = New System.Drawing.Point(103, 40)
GroupBox2.Name = "GroupBox2"
GroupBox2.Size = New System.Drawing.Size(96, 104)
GroupBox2.TabIndex = 4
GroupBox2.TabStop = False
GroupBox2.Text = "单元"
'GroupBox3
GroupBox3.Location = New System.Drawing.Point(197, 40)
GroupBox3.Name = "GroupBox3"
GroupBox3.Size = New System.Drawing.Size(96, 104)
GroupBox3.TabIndex = 5
GroupBox3.TabStop = False
GroupBox3.Text = "楼层"
'把它们添加到父控件Form1的Controls集合中
Me.Controls.Add(GroupBox1)
Me.Controls.Add(GroupBox2)
Me.Controls.Add(GroupBox3)
'添加RadioButton控件并分别绘制在GroupBox控件内
Dim RadioButton1 As New System.Windows.Forms.RadioButton
Dim RadioButton2 As New System.Windows.Forms.RadioButton
Dim RadioButton3 As New System.Windows.Forms.RadioButton
Dim RadioButton5 As New System.Windows.Forms.RadioButton
Dim RadioButton4 As New System.Windows.Forms.RadioButton
Dim RadioButton6 As New System.Windows.Forms.RadioButton
Dim RadioButton7 As New System.Windows.Forms.RadioButton
Dim RadioButton8 As New System.Windows.Forms.RadioButton
Dim RadioButton9 As New System.Windows.Forms.RadioButton
Dim RadioButton10 As New System.Windows.Forms.RadioButton
'RadioButton1
RadioButton1.Location = New System.Drawing.Point(8, 24)
RadioButton1.Name = "RadioButton1"
RadioButton1.Size = New System.Drawing.Size(80, 24)
RadioButton1.TabIndex = 0
RadioButton1.Text = "男性"
'RadioButton2
RadioButton2.Location = New System.Drawing.Point(8, 63)
RadioButton2.Name = "RadioButton2"
RadioButton2.Size = New System.Drawing.Size(80, 24)
RadioButton2.TabIndex = 1
RadioButton2.Text = "女性"
'RadioButton3
RadioButton3.Location = New System.Drawing.Point(8, 32)
RadioButton3.Name = "RadioButton3"
RadioButton3.Size = New System.Drawing.Size(80, 24)
RadioButton3.TabIndex = 1
RadioButton3.Text = "二单元"
'RadioButton5
RadioButton5.Location = New System.Drawing.Point(8, 53)
RadioButton5.Name = "RadioButton5"
RadioButton5.Size = New System.Drawing.Size(80, 24)
RadioButton5.TabIndex = 2
RadioButton5.Text = "三单元"
'RadioButton4
RadioButton4.Location = New System.Drawing.Point(8, 13)
RadioButton4.Name = "RadioButton4"
RadioButton4.Size = New System.Drawing.Size(80, 24)
RadioButton4.TabIndex = 0
RadioButton4.Text = "一单元"

