form2.frm
来自「VB源码,是初学者的福因.让你很快掌握VB编程」· FRM 代码 · 共 49 行
FRM
49 行
VERSION 5.00
Begin VB.Form Form2
Caption = "Form2"
ClientHeight = 1590
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form2"
ScaleHeight = 1590
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Left = 720
PasswordChar = "*"
TabIndex = 1
Text = "Text1"
Top = 600
Width = 2295
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "请输入密码:"
Height = 180
Left = 600
TabIndex = 0
Top = 240
Width = 1080
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
If Text1.Text = "123456" Then
Form1.Show
Unload Form2
Else
Text1.Text = ""
Label1.Caption = "密码错误,请再次输入密码:"
End If
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?