VB通过文本框输入个人的姓名、通过单选按钮组输入性别和政治面貌,通过复选框输入爱好,单机确定按钮后,
Private Sub Button1_Click(ByVa
l sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim aihao As String, Sex As String, zhengzhi As String
aihao = "爱好:"
Sex = "性别:"
zhengzhi = "政治面貌:"
If CheckBox1.Checked = True Then aihao = aihao + CheckBox1.Text + ","
If CheckBox2.Checked = True Then aihao = aihao + CheckBox2.Text + ","
If CheckBox3.Checked = True Then aihao = aihao + CheckBox3.Text + ","
If CheckBox4.Checked = True Then aihao = aihao + CheckBox4.Text
If RButton1.Checked = True Then Sex = Sex + RButton1.Text
If RButton2.Checked = True Then Sex = Sex + RButton2.Text
If RButton3.Checked = True Then zhengzhi = zhengzhi + RButton3.Text
If RButton4.Checked = True Then zhengzhi = zhengzhi + RButton4.Text
If RButton5.Checked = True Then zhengzhi = zhengzhi + RButton5.Text
TextBox2.Text = "姓名:" + TextBox1.Text + Chr(13) + Chr(10) + aihao + Chr(13) + Chr(10) + Sex + Chr(13) + Chr(10) + zhengzhi
End Sub