📄 考生管理.frm
字号:
VERSION 5.00
Begin VB.Form Form5
Caption = "考生管理"
ClientHeight = 3765
ClientLeft = 60
ClientTop = 345
ClientWidth = 6120
LinkTopic = "Form5"
ScaleHeight = 3765
ScaleWidth = 6120
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command6
Caption = "退出考生管理"
Height = 495
Left = 4800
TabIndex = 11
Top = 3120
Width = 1215
End
Begin VB.TextBox Text2
Height = 375
Left = 1560
TabIndex = 10
Top = 2280
Width = 2175
End
Begin VB.TextBox Text1
Height = 375
Left = 1560
TabIndex = 9
Top = 1800
Width = 2175
End
Begin VB.CommandButton Command7
Caption = "清空"
Height = 375
Left = 2400
TabIndex = 8
Top = 2880
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "确定"
Height = 375
Left = 480
TabIndex = 7
Top = 2880
Width = 1215
End
Begin VB.Frame Frame1
Height = 1455
Left = 120
TabIndex = 0
Top = 120
Width = 5775
Begin VB.CommandButton Command1
Caption = "添加考生"
Height = 495
Left = 240
TabIndex = 3
Top = 240
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "删除考生"
Height = 495
Left = 240
TabIndex = 2
Top = 840
Width = 1215
End
Begin VB.CommandButton Command5
Caption = "清空考生"
Height = 495
Left = 1800
TabIndex = 1
Top = 240
Width = 1215
End
Begin VB.Label Label1
Height = 495
Left = 3480
TabIndex = 4
Top = 840
Width = 2055
End
End
Begin VB.Label Label3
Caption = "考生姓名:"
Height = 375
Left = 240
TabIndex = 6
Top = 2280
Width = 1095
End
Begin VB.Label Label2
Caption = "考生考号:"
Height = 375
Left = 240
TabIndex = 5
Top = 1800
Width = 1095
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
ik = 21
Label1.Caption = Command1.Caption
Text1.SetFocus
End Sub
Private Sub Command2_Click()
Select Case ik
Case 21
'添加考生
Open App.Path & "\..\userid.dat" For Append As #11
Print #11, Text1.Text & Chr(16) & Chr(17)
Print #11, Text2.Text & Chr(16) & Chr(17)
Print #11, "60" & Chr(16) & Chr(17)
Close #11
MsgBox "添加考生成功"
Text1.Enabled = False
Text2.Enabled = False
ik = 0
Case 22
'删除考生
Open App.Path & "\..\userid.dat" For Append As #11
bytemp = delj(Text1.Text, 11, "")
If bytemp = 0 Then
MsgBox "删除考生失败"
Else
MsgBox "删除考生成功"
End If
End Select
End Sub
Private Sub Command4_Click()
ik = 22
Label1.Caption = Command4.Caption
Text1.SetFocus
End Sub
Private Sub Command5_Click()
bytemp = MsgBox("你确定要清空考生吗?", vbYesNo, "请慎重考虑!")
If bytemp = 6 Then
Open App.Path & "\..\userid.dat" For Output As #11
Close #11
MsgBox "清空完成"
End If
End Sub
Private Sub Command6_Click()
Form1.Visible = True
Form1.SetFocus
Unload Me
End Sub
Private Sub Command7_Click()
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.Visible = True
Form1.SetFocus
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -