📄 二考加时.frm
字号:
VERSION 5.00
Begin VB.Form Form2
Caption = "二考加时"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form2"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 1 '所有者中心
Begin VB.TextBox Text5
Height = 270
Left = 1320
TabIndex = 11
Top = 1560
Width = 1815
End
Begin VB.TextBox Text4
Height = 270
Left = 1320
TabIndex = 9
Top = 1200
Width = 1815
End
Begin VB.TextBox Text3
Height = 270
Left = 1320
TabIndex = 8
Top = 840
Width = 1815
End
Begin VB.TextBox Text2
Height = 270
Left = 1320
MaxLength = 12
TabIndex = 7
Top = 480
Width = 1815
End
Begin VB.TextBox Text1
Height = 270
Left = 1320
MaxLength = 12
TabIndex = 6
Top = 120
Width = 1815
End
Begin VB.CommandButton Command2
Caption = "退出加时"
Height = 495
Left = 2520
TabIndex = 5
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定"
Enabled = 0 'False
Height = 495
Left = 360
TabIndex = 4
Top = 2520
Width = 1095
End
Begin VB.Label Label7
Caption = "分钟"
Height = 255
Left = 3240
TabIndex = 13
Top = 1560
Width = 495
End
Begin VB.Label Label6
Caption = "共有时间:"
Height = 255
Left = 240
TabIndex = 12
Top = 1920
Width = 2895
End
Begin VB.Label Label5
Caption = "所加时间:"
Height = 255
Left = 240
TabIndex = 10
Top = 1560
Width = 975
End
Begin VB.Label Label4
Caption = "余下时间:"
Height = 255
Left = 240
TabIndex = 3
Top = 1200
Width = 975
End
Begin VB.Label Label3
Caption = "考生姓名:"
Height = 255
Left = 240
TabIndex = 2
Top = 840
Width = 975
End
Begin VB.Label Label2
Caption = "确认考号:"
Height = 255
Left = 240
TabIndex = 1
Top = 480
Width = 975
End
Begin VB.Label Label1
Caption = "准考证号:"
Height = 255
Left = 240
TabIndex = 0
Top = 120
Width = 975
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
If Me.Caption = "二考加时" Then
Open App.Path & "\useridb.dat" For Binary As #5
bytemp = addtime(Text1.Text, 5, Text5.Text)
Print #3, "服务器:二考加时" & form3.Text1.Text & "对"; Text1.Text & "加" & Text5.Text & " " & Date & Time & Chr(16) & Chr(17)
MsgBox "加时成功!"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Label6.Caption = "共有时间:"
Command1.Enabled = False
Else
Open App.Path & "\useridb.dat" For Append As #5
Print #5, Text1.Text & Chr(16) & Chr(17)
Print #5, Text3.Text & Chr(16) & Chr(17)
Print #5, Text4.Text & Chr(16) & Chr(17)
Close #5
Print #3, "服务器:二考加入" & form3.Text1.Text & "对"; Text1.Text & "加入二考名单" & Date & Time & Chr(16) & Chr(17)
MsgBox "加入成功!"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Command1.Enabled = False
End If
End Sub
Private Sub Command2_Click()
Form1.Visible = True
Form1.Command5.Enabled = True
Form1.Command6.Enabled = True
Form1.Command10.Enabled = True
Form1.Command11.Enabled = True
Form1.addfen.Enabled = True
Form1.runfen.Enabled = True
Form1.lookfen.Enabled = True
Form1.twostud.Enabled = True
Form1.SetFocus
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.Visible = True
Form1.Command5.Enabled = True
Form1.Command6.Enabled = True
Form1.Command10.Enabled = True
Form1.Command11.Enabled = True
Form1.SetFocus
End Sub
Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
If Text1.Text = "" Or Text1.Text = vbNullString Then Exit Sub
If Right(Text1.Text, 1) > "9" Or Right(Text1.Text, 1) < "0" Then
Text1.Text = Left(Text1.Text, Len(Text1.Text) - 1)
Text1.SelStart = Len(Text1.Text)
Exit Sub
End If
If Len(Text1.Text) = 12 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)
If Text2.Text = "" Or Text2.Text = vbNullString Then Exit Sub
If Right(Text2.Text, 1) > "9" Or Right(Text2.Text, 1) < "0" Then
Text2.Text = Left(Text2.Text, Len(Text2.Text) - 1)
Text2.SelStart = Len(Text2.Text)
Exit Sub
End If
If Len(Text2.Text) = 12 And Text1.Text = Text2.Text Then
Dim usenam, usefen As String
If Me.Caption = "二考加时" Then
Open App.Path & "\useridb.dat" For Binary As #5
usenam = findadd(5, Text1.Text, usefen)
If usenam = "nullname" Then
MsgBox "准考证号错误!"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Else
Text3.Text = usenam
Text4.Text = usefen
Text5.SetFocus
Command1.Enabled = True
End If
Else
Open App.Path & "\userid.dat" For Binary As #5
usenam = findadd(5, Text1.Text, usefen)
If usenam = "nullname" Then
MsgBox "准考证号错误!"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Else
Text3.Text = usenam
Text4.Text = usefen
Command1.Enabled = True
Command1.SetFocus
End If
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -