📄 产生校验号.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4635
ClientLeft = 60
ClientTop = 510
ClientWidth = 7110
LinkTopic = "Form1"
ScaleHeight = 4635
ScaleWidth = 7110
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Height = 4095
Left = 240
TabIndex = 0
Top = 240
Width = 6615
Begin VB.CommandButton Command2
Caption = "清除"
Height = 735
Left = 3960
TabIndex = 6
Top = 2880
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "产生"
Height = 735
Left = 1080
TabIndex = 5
Top = 2880
Width = 1575
End
Begin VB.TextBox Text1
Height = 735
Left = 600
TabIndex = 1
Top = 1320
Width = 2535
End
Begin VB.Label Label3
BorderStyle = 1 'Fixed Single
Height = 735
Left = 3600
TabIndex = 4
Top = 1320
Width = 2535
End
Begin VB.Label Label2
Caption = "显示具有校验位的准考证号"
Height = 495
Left = 3480
TabIndex = 3
Top = 600
Width = 1215
End
Begin VB.Label Label1
Caption = "输入准考证号"
Height = 375
Left = 720
TabIndex = 2
Top = 600
Width = 1455
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
a = Len(Text1.Text)
f = Val(Text1.Text)
If a = 7 And IsNumeric(Text1) Then
For i = 1 To 7
k = f Mod 10
f = f \ 10
h = k * i + h
Next i
Label3.Caption = Text1.Text & Str(h Mod 10)
Else
z = MsgBox("输入错误!", vbOKOnly, "警告!")
Text1.Text = ""
Text1.SetFocus
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -