📄 frmlogin.frm
字号:
VERSION 5.00
Begin VB.Form FrmLogin
BorderStyle = 3 'Fixed Dialog
Caption = "操作员登陆"
ClientHeight = 3225
ClientLeft = 30
ClientTop = 330
ClientWidth = 5100
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3225
ScaleMode = 0 'User
ScaleWidth = 5557.692
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Tag = "login"
Begin VB.ComboBox Txtname
Height = 300
Left = 1560
Style = 1 'Simple Combo
TabIndex = 1
Top = 960
Width = 3135
End
Begin VB.CommandButton CmdEXIT
Cancel = -1 'True
Caption = "退出(&E)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 4
Top = 2040
Width = 1455
End
Begin VB.CommandButton CmdOK
Caption = "确认(&O)"
Default = -1 'True
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
TabIndex = 3
Top = 2040
Width = 1455
End
Begin VB.TextBox TxtPWD
Height = 285
IMEMode = 3 'DISABLE
Left = 1560
MaxLength = 20
PasswordChar = "*"
TabIndex = 2
Top = 1530
Width = 3135
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "版权提供: linlin_1117@126.com"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 480
TabIndex = 7
Top = 2760
Width = 4005
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "操作员口令"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 6
Top = 1560
Width = 1140
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "操作员名称"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 5
Top = 960
Width = 1140
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "员工信息管理系统"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 495
Left = 480
TabIndex = 0
Top = 240
Width = 4215
End
End
Attribute VB_Name = "FrmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmdEXIT_Click()
End
End Sub
Private Sub CmdOK_Click()
If TxtPWD.Text = Empty Then
MsgBox "请输入密码", vbInformation, "密码错误"
Exit Sub
Else
'传递输入的帐号密码给密码查找函数,调用密码文件并查找正确密码,找到返回值为真,否则为假
If LoginIn(CStr(TxtName.Text), CStr(TxtPWD.Text)) Then
FrmMain.Show
Unload Me
Else
MsgBox "输入错误,请确定用户名和密码是否正确", vbInformation, "输入错误"
End If
FrmMain.SbStatusBar.Panels(1) = "就绪..."
End If
End Sub
Private Sub Form_Load()
TxtName.Text = "Administrator"
CmdOK.Enabled = False
End Sub
Private Sub TxtName_KeyPress(KeyAscii As Integer)
CmdOK.Enabled = True
End Sub
Private Sub TxtName_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
CmdOK.Enabled = True
End Sub
Private Sub TxtPWD_KeyPress(KeyAscii As Integer)
CmdOK.Enabled = True
End Sub
Private Sub TxtPWD_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
CmdOK.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -