📄 帐号密码.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "确定"
Height = 615
Left = 360
TabIndex = 4
Top = 2160
Width = 1095
End
Begin VB.TextBox Text2
Height = 495
Left = 1560
MaxLength = 5
TabIndex = 3
Top = 1320
Width = 1935
End
Begin VB.TextBox Text1
Height = 495
Left = 1560
MaxLength = 6
TabIndex = 2
Top = 480
Width = 1935
End
Begin VB.Label Label2
BorderStyle = 1 'Fixed Single
Caption = "密码"
Height = 495
Left = 360
TabIndex = 1
Top = 1320
Width = 975
End
Begin VB.Label Label1
BorderStyle = 1 'Fixed Single
Caption = "帐号"
Height = 495
Left = 360
TabIndex = 0
Top = 480
Width = 975
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 <> "zhang" Then
i = MsgBox("密码错误", 5 + vbExclamation, "输入密码")
If i = 2 Then
End
Else
Text2.Text = ""
Text2.SetFocus
End If
End If
End Sub
Private Sub Form_Load()
Text2.PasswordChar = "*"
Text2.Text = ""
Text1 = ""
End Sub
Private Sub Text1_LostFocus()
If Not IsNumeric(Text1) Then
MsgBox "帐号有非数字字符错误"
Text1.Text = ""
Text1.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -