📄 frm_cardkey.frm
字号:
VERSION 5.00
Begin VB.Form frm_CardKey
BorderStyle = 3 'Fixed Dialog
Caption = "生成密码卡"
ClientHeight = 3645
ClientLeft = 45
ClientTop = 450
ClientWidth = 8505
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3645
ScaleWidth = 8505
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.TextBox key2a
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
IMEMode = 3 'DISABLE
Left = 6240
MaxLength = 8
PasswordChar = "*"
TabIndex = 9
Top = 1320
Width = 1695
End
Begin VB.TextBox key2b
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
IMEMode = 3 'DISABLE
Left = 6240
MaxLength = 8
PasswordChar = "*"
TabIndex = 8
ToolTipText = "输入卡密码"
Top = 1920
Width = 1695
End
Begin VB.TextBox key1a
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
IMEMode = 3 'DISABLE
Left = 2160
MaxLength = 8
PasswordChar = "*"
TabIndex = 3
Top = 1320
Width = 1695
End
Begin VB.TextBox key1b
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
IMEMode = 3 'DISABLE
Left = 2160
MaxLength = 8
PasswordChar = "*"
TabIndex = 2
ToolTipText = "输入卡密码"
Top = 1920
Width = 1695
End
Begin VB.CommandButton Command2
Caption = "退出(&Q)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4320
TabIndex = 1
Top = 2880
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "生成(&O)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2280
TabIndex = 0
Top = 2880
Width = 1815
End
Begin VB.Label Label2
Caption = "重输密码因子2:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 4440
TabIndex = 11
Top = 1920
Width = 1695
End
Begin VB.Label Label4
Caption = "密码因子2:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Index = 2
Left = 4440
TabIndex = 10
Top = 1320
Width = 1455
End
Begin VB.Label Label1
Caption = "重输密码因子1:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 360
TabIndex = 7
Top = 1920
Width = 1695
End
Begin VB.Label Label4
Caption = "密码因子1:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Index = 0
Left = 360
TabIndex = 6
Top = 1320
Width = 1335
End
Begin VB.Image Image2
Height = 480
Index = 0
Left = 7560
Picture = "frm_CardKey.frx":0000
Top = 120
Width = 480
End
Begin VB.Label Label4
BackColor = &H80000005&
Caption = "请妥善保管密码卡和密码卡密钥因子"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Index = 1
Left = 360
TabIndex = 5
Top = 120
Width = 5655
End
Begin VB.Shape Shape1
BorderColor = &H00C0C0C0&
FillColor = &H00FFFFFF&
FillStyle = 0 'Solid
Height = 855
Left = 0
Top = 0
Width = 8535
End
Begin VB.Image Image2
Height = 480
Index = 1
Left = 240
Picture = "frm_CardKey.frx":0442
Top = 240
Width = 480
End
Begin VB.Label Label3
BackColor = &H80000009&
Caption = "请输入登录名称和用户密码"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 960
TabIndex = 4
Top = 360
Width = 3132
End
End
Attribute VB_Name = "frm_CardKey"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sInputKey As String
'Dim sErr As String
If Len(key1a.Text) <> 8 Or Len(key1b.Text) <> 8 Then
MsgBox "密码因子一组必须是8个数字,请重输入!", vbInformation + vbOKOnly, "中芯德立提示信息"
key1a.Text = ""
key1b.Text = ""
Exit Sub
End If
If key1a.Text <> key1b.Text Then
MsgBox "密码因子1两次输入不一致,请重输入!", vbInformation + vbOKOnly, "中芯德立提示信息"
key1a.Text = ""
key1b.Text = ""
Exit Sub
End If
If Len(key2a.Text) <> 8 Or Len(key2b.Text) <> 8 Then
MsgBox "密码因子一组必须是8个数字,请重输入!", vbInformation + vbOKOnly, "中芯德立提示信息"
key2a.Text = ""
key2b.Text = ""
Exit Sub
End If
If key2a.Text <> key2b.Text Then
MsgBox "密码因子2两次输入不一致,请重输入!", vbInformation + vbOKOnly, "中芯德立提示信息"
key2a.Text = ""
key2b.Text = ""
Exit Sub
End If
sInputKey = key1a.Text & key2a.Text
sInputKey = sInputKey & sInputKey
If Len(sInputKey) <> 32 Then Exit Sub
If ReaderOpen = False Then MsgBox "未检测到IC卡读写器,请检查!", vbInformation + vbOKOnly, "中芯德立提示信息": Exit Sub
MsgBox "请将一张新卡放在读写器感应区!", vbInformation + vbOKOnly, "中芯德立提示信息"
If R_CardKey(sInputKey, sErr) = True Then
MsgBox "密码卡发行成功!", vbInformation + vbOKOnly, "中芯德立提示信息"
Else
MsgBox "密码卡发行失败!", vbInformation + vbOKOnly, "中芯德立提示信息"
End If
err:
Call ReaderClose
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Top = (Screen.Height - Me.Height) / 2
Me.Left = (Screen.Width - Me.Width) / 2
End Sub
Private Sub key1a_KeyPress(KeyAscii As Integer)
If KeyAscii > 57 Or KeyAscii < 48 And KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
Private Sub key1b_KeyPress(KeyAscii As Integer)
If KeyAscii > 57 Or KeyAscii < 48 And KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
Private Sub key2a_KeyPress(KeyAscii As Integer)
If KeyAscii > 57 Or KeyAscii < 48 And KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
Private Sub key2b_KeyPress(KeyAscii As Integer)
If KeyAscii > 57 Or KeyAscii < 48 And KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -