📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3120
ClientLeft = 60
ClientTop = 420
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3120
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
Caption = "退出"
Height = 495
Left = 3360
TabIndex = 6
Top = 2400
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "清空"
Height = 495
Left = 1800
TabIndex = 5
Top = 2400
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "登录"
Height = 495
Left = 360
TabIndex = 4
Top = 2400
Width = 1095
End
Begin VB.TextBox Text2
Height = 495
IMEMode = 3 'DISABLE
Left = 1920
MaxLength = 6
PasswordChar = "*"
TabIndex = 1
Top = 1080
Width = 2655
End
Begin VB.TextBox Text1
Height = 495
Left = 1920
MaxLength = 6
TabIndex = 0
Top = 240
Width = 2655
End
Begin VB.Label Label2
Caption = "请输入密码"
Height = 255
Left = 360
TabIndex = 3
Top = 1200
Width = 1335
End
Begin VB.Label Label1
Caption = "请输入帐号"
Height = 255
Left = 360
TabIndex = 2
Top = 360
Width = 1335
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()
Dim i As Integer
If Text2.Text = "521" Then
MsgBox "输入正确"
Form2.Show
Else
i = MsgBox("密码错误", 5 + vbExclamation, "输入密码")
If i <> 4 Then
End
Else
Text2.Text = ""
Text2.SetFocus
End If
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
End Sub
Private Sub Text2_GotFocus()
If Not IsNumeric(Text1) Then
MsgBox "账号有非数字字符", vbExclamation, "输入账号"
Text1.Text = ""
Text1.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -