📄 例5.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 1680
TabIndex = 2
Top = 1800
Width = 1335
End
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Left = 2640
PasswordChar = "*"
TabIndex = 1
Top = 960
Width = 1335
End
Begin VB.Label Label1
Caption = "请输入密码(123)"
Height = 375
Left = 600
TabIndex = 0
Top = 960
Width = 1815
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()
Static I As Integer
MIMA = Text1
If MIMA = "123" Then
MSG = MsgBox("密码正确!")
Unload Me
Else
I = I + 1
PROMPT = "第" & Str(I) & " 次密码错误,重新输入!"
MSG = MsgBox(PROMPT)
Text1 = ""
Text1.SetFocus
If I >= 3 Then End
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -