passfrm.frm
来自「guan yu pai ke xi tong de ruan jian」· FRM 代码 · 共 83 行
FRM
83 行
VERSION 5.00
Begin VB.Form PassFrm
BorderStyle = 1 'Fixed Single
Caption = "密码验证"
ClientHeight = 1395
ClientLeft = 45
ClientTop = 330
ClientWidth = 4020
Icon = "PassFrm.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1395
ScaleWidth = 4020
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "取 消"
Height = 375
Index = 1
Left = 3000
TabIndex = 3
Top = 960
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确 定"
Default = -1 'True
Height = 375
Index = 0
Left = 1800
TabIndex = 2
Top = 960
Width = 975
End
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Left = 120
PasswordChar = "*"
TabIndex = 0
Top = 480
Width = 3855
End
Begin VB.Label Label1
Caption = "请输入密码:"
Height = 255
Left = 120
TabIndex = 1
Top = 120
Width = 3735
End
End
Attribute VB_Name = "PassFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'要求公用模块中有一个公用变量PassString.该变量的值被其它过程设置.
Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0: '确定.
If Me.Text1.Text = PassString Then
Unload Me
Exit Sub
Else
If MsgBox("密码错误!" & Chr(13) & "要重新输入密码吗?", vbOKCancel + vbDefaultButton1, "密码错误...") = vbOK Then
Me.Text1.Text = ""
Else
PassString = ""
Unload Me
End If
End If
Case 1: '取消.
PassString = ""
Unload Me
End Select
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?