📄 passwd.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 1530
ClientLeft = 60
ClientTop = 345
ClientWidth = 3045
LinkTopic = "Form1"
ScaleHeight = 1530
ScaleWidth = 3045
StartUpPosition = 3 'Windows Default
Begin VB.Label Label1
Caption = "密码验证已经通过,欢迎您使用本系统!"
Height = 615
Left = 360
TabIndex = 0
Top = 360
Width = 2055
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Dim passwd As String
Dim i As Integer
passwd = InputBox("输入密码", "密码框")
i = 0
If passwd = "test" Then
MsgBox ("密码正确!")
Else
Do While passwd <> "test"
If i > 1 Then
MsgBox ("已经三次密码输入错误,程序将关闭")
Exit Do
End If
passwd = InputBox("输入密码", "密码框")
i = i + 1
Loop
Unload Form1
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -