📄 student.vb
字号:
Public Class student
Private Sub student_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'隐藏登陆窗口
Form1.Visible = False
comboCourse.Items.Add("网络程序开发人员")
comboCourse.Items.Add("数据库管理员")
comboCourse.Items.Add("网络管理员")
comboCourse.Items.Add("Windows程序开发人员")
listTime.Items.Add("7:00-9:00")
listTime.Items.Add("9:00-11:00")
listTime.Items.Add("11:00-1:00")
listTime.Items.Add("1:00-3:00")
listTime.Items.Add("3:00-5:00")
listTime.SelectedIndex = 0
tName.Focus()
End Sub
Private Sub bYes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bYes.Click
Dim Gender As String
Dim Course As String
Dim TimeSlot As String
Dim Facilities As String
Dim flag As Boolean REM 是否已选了专业方向
flag = False
Facilities = ""
Gender = ""
If tName.Text = "" Or tAge.Text = "" Or tAddress.Text = "" Or gbSex.Text = "" Then
MsgBox("请输入所有项目", 17, "错误提示")
Else
If radioMan.Checked Then
Gender = "男"
ElseIf radioWoman.Checked Then
Gender = "女"
End If
If checkLibrary.Checked Then
Facilities = "图书馆 "
End If
If checkComputer.Checked Then
Facilities = Facilities & " 电脑室"
End If
TimeSlot = listTime.SelectedItem.ToString
REM 检查是否选了专业方向
If flag = False Then
Try
Course = comboCourse.SelectedItem.ToString
flag = True
Catch ex As Exception
MsgBox("请选择你的专业方向", 16, "错误提示")
End Try
End If
If flag = True Then
MsgBox("姓名: " + tName.Text + vbNewLine + " 年龄: " + tAge.Text + vbNewLine + " 地址: " + tAddress.Text + vbNewLine + " 性别: " + Gender + vbNewLine + " 专业方向: " + Course + vbNewLine + " 时间片: " + TimeSlot + vbNewLine + " 设备 : " + Facilities, 65, "输入结果")
tName.Text = ""
tAge.Text = ""
tAddress.Text = ""
radioMan.Checked = False
radioWoman.Checked = False
checkLibrary.Checked = False
checkComputer.Checked = False
comboCourse.Text = ""
listTime.SelectedIndex = 0
End If
End If
End Sub
Private Sub bClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bClose.Click
Form1.Close()
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -