Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub tijiao_()
#Region(" Windows 窗体设计器生成的代码 ")
Private Sub new()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写 dispose 以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox
Friend WithEvents CheckBox2 As System.Windows.Forms.CheckBox
Friend WithEvents CheckBox3 As System.Windows.Forms.CheckBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents RadioButton1 As System.Windows.Forms.RadioButton
Friend WithEvents RadioButton2 As System.Windows.Forms.RadioButton
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents tijiao As System.Windows.Forms.Button
Friend WithEvents txtxingming As System.Windows.Forms.TextBox
Friend WithEvents txtnianlin As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.txtxingming = New System.Windows.Forms.TextBox
Me.txtnianlin = New System.Windows.Forms.TextBox
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.Label5 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.CheckBox3 = New System.Windows.Forms.CheckBox
Me.CheckBox2 = New System.Windows.Forms.CheckBox
Me.CheckBox1 = New System.Windows.Forms.CheckBox
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.Label7 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.RadioButton2 = New System.Windows.Forms.RadioButton
Me.RadioButton1 = New System.Windows.Forms.RadioButton
Me.tijiao = New System.Windows.Forms.Button
Me.Label8 = New System.Windows.Forms.Label
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label1.Location = New System.Drawing.Point(40, 32)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(56, 32)
Me.Label1.TabIndex = 1
Me.Label1.Text = "姓名"
'
'Label2
'
Me.Label2.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label2.Location = New System.Drawing.Point(40, 96)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(56, 24)
Me.Label2.TabIndex = 3
Me.Label2.Text = "年龄"
'
'txtxingming
'
Me.txtxingming.Location = New System.Drawing.Point(112, 32)
Me.txtxingming.Name = "txtxingming"
Me.txtxingming.Size = New System.Drawing.Size(112, 26)
Me.txtxingming.TabIndex = 2
Me.txtxingming.Text = ""
'
'txtnianlin
'
Me.txtnianlin.Location = New System.Drawing.Point(112, 88)
Me.txtnianlin.Name = "txtnianlin"
Me.txtnianlin.Size = New System.Drawing.Size(112, 26)
Me.txtnianlin.TabIndex = 4
Me.txtnianlin.Text = ""
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.CheckBox3)
Me.GroupBox1.Controls.Add(Me.CheckBox2)
Me.GroupBox1.Controls.Add(Me.CheckBox1)
Me.GroupBox1.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.GroupBox1.Location = New System.Drawing.Point(264, 24)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(168, 192)
Me.GroupBox1.TabIndex = 5
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "兴趣爱好"
'
'Label5
'
Me.Label5.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label5.Location = New System.Drawing.Point(64, 128)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(48, 16)
Me.Label5.TabIndex = 5
Me.Label5.Text = "拳击"
'
'Label4
'
Me.Label4.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label4.Location = New System.Drawing.Point(64, 80)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(48, 24)
Me.Label4.TabIndex = 4
Me.Label4.Text = "击剑"
'
'Label3
'
Me.Label3.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label3.Location = New System.Drawing.Point(64, 32)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(64, 16)
Me.Label3.TabIndex = 3
Me.Label3.Text = "游泳"
'
'CheckBox3
'
Me.CheckBox3.Location = New System.Drawing.Point(24, 128)
Me.CheckBox3.Name = "CheckBox3"
Me.CheckBox3.Size = New System.Drawing.Size(16, 16)
Me.CheckBox3.TabIndex = 3
Me.CheckBox3.Text = "CheckBox3"
'
'CheckBox2
'
Me.CheckBox2.Location = New System.Drawing.Point(24, 80)
Me.CheckBox2.Name = "CheckBox2"
Me.CheckBox2.Size = New System.Drawing.Size(16, 16)
Me.CheckBox2.TabIndex = 2
Me.CheckBox2.Text = "CheckBox2"
'
'CheckBox1
'
Me.CheckBox1.Location = New System.Drawing.Point(24, 40)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(16, 8)
Me.CheckBox1.TabIndex = 1
Me.CheckBox1.Text = "CheckBox1"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.Label7)
Me.GroupBox2.Controls.Add(Me.Label6)
Me.GroupBox2.Controls.Add(Me.RadioButton2)
Me.GroupBox2.Controls.Add(Me.RadioButton1)
Me.GroupBox2.Location = New System.Drawing.Point(40, 136)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(184, 80)
Me.GroupBox2.TabIndex = 6
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "性别"
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(48, 32)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(40, 16)
Me.Label7.TabIndex = 1
Me.Label7.Text = "男"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(136, 32)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(32, 16)
Me.Label6.TabIndex = 3
Me.Label6.Text = "女"
'
'RadioButton2
'
Me.RadioButton2.Location = New System.Drawing.Point(112, 32)
Me.RadioButton2.Name = "RadioButton2"
Me.RadioButton2.Size = New System.Drawing.Size(16, 16)
Me.RadioButton2.TabIndex = 2
Me.RadioButton2.Text = "RadioButton2"
'
'RadioButton1
'
Me.RadioButton1.Location = New System.Drawing.Point(16, 32)
Me.RadioButton1.Name = "RadioButton1"
Me.RadioButton1.Size = New System.Drawing.Size(16, 16)
Me.RadioButton1.TabIndex = 0
Me.RadioButton1.Text = "RadioButton1"
'
'tijiao
'
Me.tijiao.Image = CType(resources.GetObject("tijiao.Image"), System.Drawing.Image)
Me.tijiao.Location = New System.Drawing.Point(40, 240)
Me.tijiao.Name = "tijiao"
Me.tijiao.Size = New System.Drawing.Size(112, 32)
Me.tijiao.TabIndex = 7
Me.tijiao.Text = "提交"
'
'Label8
'
Me.Label8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Label8.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Label8.Location = New System.Drawing.Point(24, 296)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(408, 112)
Me.Label8.TabIndex = 4
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(9, 19)
Me.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(192, Byte), CType(255, Byte))
Me.ClientSize = New System.Drawing.Size(456, 421)
Me.Controls.Add(Me.Label8)
Me.Controls.Add(Me.tijiao)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.txtnianlin)
Me.Controls.Add(Me.txtxingming)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Name = "Form1"
Me.Text = "人员调查表"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub tijiao_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tijiao.Click
Dim strname As String '用来存放姓名
Dim strage As String '用来存放年龄
Dim strsex As String '用来存放性别
Dim strinterest As String '用来存放兴趣
'给变量赋值
strname = txtxingming.Text
strage = txtnianlin.Text
'对性别作出判别,并给变量strsex赋值
If RadioButton1.Checked = True Then
strsex = "男"
Else
strsex = "女"
End If
'对兴趣爱好作判别,并给变量strintetest赋值
If CheckBox1.Checked = True Then '判别是否选择了游泳
strinterest = strinterest + "游泳"
End If
If CheckBox2.Checked = True Then '判别是否选择了击剑
If strinterest <> "" Then
strinterest = strinterest + "'" + "击剑"
Else
strinterest = strinterest + "击剑"
End If
End If
If CheckBox3.Checked = True Then '判别是否选择了拳击
If strinterest <> "" Then
strinterest = strinterest + "'" + "拳击"
Else
strinterest = strinterest + "拳击"
End If
End If
'给标签Label8赋值,显示结果
Label8.Text = "姓名:" + strname + "," + "年龄:" + strage + "," + "性别:" + strsex + "," + "兴趣爱好:" + strinterest
End Sub
End Class