📄 password.frm
字号:
VERSION 5.00
Begin VB.Form frmPassword
BorderStyle = 4 'Fixed ToolWindow
Caption = "密码"
ClientHeight = 3300
ClientLeft = 45
ClientTop = 285
ClientWidth = 4470
BeginProperty Font
Name = "华文行楷"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "Password.frx":0000
ScaleHeight = 3300
ScaleWidth = 4470
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取消"
BeginProperty Font
Name = "方正舒体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2520
MaskColor = &H00FF00FF&
TabIndex = 5
Top = 2280
Width = 975
End
Begin VB.CommandButton cmdOK
Caption = "确定"
Default = -1 'True
BeginProperty Font
Name = "方正舒体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
MaskColor = &H00FF00FF&
TabIndex = 4
Top = 2280
Width = 975
End
Begin VB.TextBox txtPwd
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Index = 1
Left = 1920
TabIndex = 2
Top = 1440
Width = 1455
End
Begin VB.TextBox txtPwd
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Index = 0
Left = 1920
TabIndex = 0
Top = 600
Width = 1455
End
Begin VB.Label lblPwd
AutoSize = -1 'True
BackColor = &H80000012&
Caption = "确认密码:"
BeginProperty Font
Name = "方正舒体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 225
Index = 1
Left = 720
TabIndex = 3
Top = 1440
Width = 900
End
Begin VB.Label lblPwd
AutoSize = -1 'True
BackColor = &H80000012&
Caption = "输入密码:"
BeginProperty Font
Name = "方正舒体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 225
Index = 0
Left = 720
TabIndex = 1
Top = 600
Width = 900
End
End
Attribute VB_Name = "frmPassword"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdCancel_Click()
'将密码框赋空,表示不改变密码。
txtPwd(0) = ""
Me.Hide
End Sub
Private Sub cmdOK_Click()
'判断密码的有效性(两次密码要一致,而且密码不能为空)
If txtPwd(0) <> txtPwd(1) Then
MsgBox "两次密码输入的结果不一致!请重新输入", vbCritical, "错误"
ElseIf txtPwd(0) = "" Then
MsgBox "密码不能为空!", vbCritical, "错误"
Else
Me.Hide
End If
End Sub
Private Sub Form_Load()
txtPwd(0).PasswordChar = "*"
txtPwd(1).PasswordChar = "*"
txtPwd(0) = ""
txtPwd(1) = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -