📄 form4.frm
字号:
VERSION 5.00
Begin VB.Form Form4
BackColor = &H80000000&
Caption = "Form4"
ClientHeight = 3195
ClientLeft = 5640
ClientTop = 4320
ClientWidth = 4680
LinkTopic = "Form4"
Picture = "Form4.frx":0000
ScaleHeight = 3195
ScaleWidth = 4680
Begin VB.TextBox combo1
Height = 375
Left = 1680
TabIndex = 5
Top = 600
Width = 2415
End
Begin VB.TextBox txtPassword
Height = 375
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 2
Top = 1440
Width = 2415
End
Begin VB.CommandButton cmdCancel
BackColor = &H80000004&
Cancel = -1 'True
Caption = "取消"
Height = 390
Left = 2760
Style = 1 'Graphical
TabIndex = 1
Top = 2490
Width = 1140
End
Begin VB.CommandButton cmdOK
BackColor = &H80000004&
Caption = "确定"
Default = -1 'True
Height = 390
Left = 810
Style = 1 'Graphical
TabIndex = 0
ToolTipText = "直接点击可进入"
Top = 2445
Width = 1140
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "密 码(&P):"
BeginProperty Font
Name = "隶书"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 315
Index = 1
Left = 360
TabIndex = 4
Top = 1470
Width = 1080
End
Begin VB.Label lblLabels
BackColor = &H80000004&
BackStyle = 0 'Transparent
Caption = "用户名称(&U):"
BeginProperty Font
Name = "隶书"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0080FF80&
Height = 315
Index = 0
Left = 360
TabIndex = 3
Top = 600
Width = 1080
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
End
End Sub
Private Sub cmdOK_Click()
'检查正确的密码
If combo1.Text = "1" And txtPassword = "1" Or combo1.Text = "" And txtPassword = "" Then
'将代码放在这里传递
'成功到 calling 函数
'设置全局变量时最容易的
LoginSucceeded = True
Me.Hide
Form2.Show
txtPassword = ""
Else
MsgBox "用户名或密码错误,请重试!", , "登录"
combo1.SetFocus
txtPassword = ""
SendKeys "{Home}+{End}"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -