求VB个人简历表程序
代码如下:
Private Sub Command1_Click() '显示信息
Label3.Caption = 简历
Label3.Caption = Label3.Caption & vbCrLf & 姓名: & Text1.Text
Label3.Caption = Label3.Caption & vbCrLf & 年龄: & Text2.Text
If Option1.Value = True Then
Label3.Caption = Label3.Caption & vbCrLf & 性别:男
Else
Label3.Caption = Label3.Caption & vbCrLf & 性别:女
End If
If Option3.Value = True Then
Label3.Caption = Label3.Caption & vbCrLf & 学历:大专
ElseIf Option4.Value = True Then
Label3.Caption = Label3.Caption & vbCrLf & 学历:本科
Else
Label3.Caption = Label3.Caption & vbCrLf & 学历:研究生
End If
If Option6.Value = True Then
Label3.Caption = Label3.Caption & vbCrLf & 职业:教师
ElseIf Option7.Value = True Then
Label3.Caption = Label3.Caption & vbCrLf & 职业:医生
Else
Label3.Caption = Label3.Caption & vbCrLf & 职业:公务员
End If
x = vbCrLf & 爱好:
For i = 0 To 3
If Check1(i) = 1 Then x = x & Check1(i).Caption &
Next i
Label3.Caption = Label3.Caption & x
End Sub
Private Sub Command2_Click()
Form_Load '初始化窗体
End Sub
Private Sub Form_Load() '初始化窗体
Text1.Text =
Text2.Text =
Option1.Value = True
Option2.Value = False
Option3.Value = True
Option4.Value = False
Option5.Value = False
Option6.Value = True
Option7.Value = False
Option8.Value = False
For i = 0 To 3
Check1(i).Value = 0
Next i
Label3.Caption =
End Sub
编写一个“个人简历表”程序。该程序运行后,用户在文本框中输入姓名和年龄,选择性别、职业、学历和个人兴趣等个人信息。单击“递交”按钮运行后,在右侧Label1控件显示具体个人信息;单击“重置”按钮则清除输入的信息和所做的选择。运行界面如图2.3.8所示。
代码如下:
Private Sub Command1_Click()
Dim vbXB As Integer, vbXL As Integer, vbZY As Integer, vbAH As String
For i = 0 To 1
If Option1(i).Value = True Then vbXB = i
Next i
For i = 0 To 2
If Option2(i).Value = True Then vbXL = i
If Option3(i).Value = True Then vbZY = i
Next i
For i = 0 To 3
If Check1(i).Value = 1 Then
If vbAH = Then
vbAH = Check1(i).Caption
Else
vbAH = vbAH & 、 & Check1(i).Caption
End If
End If
Next i
Label1.Caption = 简历 & vbCrLf & _
姓名: & Text1.Text & vbCrLf & _
年龄: & Text2.Text & vbCrLf & _
性别: & Option1(vbXB).Caption & vbCrLf & _
学历: & Option2(vbXL).Caption & vbCrLf & _
职业: & Option3(vbZY).Caption & vbCrLf & _
爱好: & vbAH
End Sub
Private Sub Command2_Click()
Label1.Caption =
End Sub