frml2.frm
来自「VB工资管理系统」· FRM 代码 · 共 136 行
FRM
136 行
VERSION 5.00
Begin VB.Form frmLogin2
BorderStyle = 3 'Fixed Dialog
Caption = "登录"
ClientHeight = 1965
ClientLeft = 45
ClientTop = 330
ClientWidth = 4545
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1965
ScaleWidth = 4545
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Tag = "1056"
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "E:\VB98\数据库\main.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 1680
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "pw"
Top = 1440
Visible = 0 'False
Width = 1140
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取消"
Height = 360
Left = 3000
TabIndex = 5
Tag = "1060"
Top = 1440
Width = 1140
End
Begin VB.CommandButton cmdOK
Caption = "确定"
Default = -1 'True
Height = 360
Left = 360
TabIndex = 4
Tag = "1059"
Top = 1440
Width = 1140
End
Begin VB.TextBox txtPassword1
Height = 270
IMEMode = 3 'DISABLE
Left = 1500
PasswordChar = "*"
TabIndex = 3
Top = 832
Width = 2325
End
Begin VB.TextBox txtUserName
Height = 270
Left = 1500
TabIndex = 2
Top = 225
Width = 2325
End
Begin VB.Label passwork1
Alignment = 2 'Center
Caption = "密码(&P):"
Height = 255
Left = 300
TabIndex = 1
Tag = "1058"
Top = 840
Width = 1080
End
Begin VB.Label xt
Alignment = 2 'Center
Caption = "系统员(&U):"
Height = 255
Left = 300
TabIndex = 0
Tag = "1057"
Top = 240
Width = 1080
End
End
Attribute VB_Name = "frmLogin2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OK As Boolean
Private Sub cmdCancel_Click()
OK = False
Unload Me
End Sub
Private Sub cmdOK_Click()
Data1.Recordset.MoveFirst
Do Until Data1.Recordset.EOF
If Data1.Recordset.Fields("系统员") = txtUserName.Text Then
If Data1.Recordset.Fields("pass") = txtPassword1.Text Then
OK = True
Unload Me
初始化.Show
Exit Do
Else
MsgBox "密码输入错误,再试一次!", , "登录"
txtPassword1.SetFocus
txtPassword1.SelStart = 0
txtPassword1.SelLength = Len(txtPassword1.Text)
Exit Do
End If
End If
Data1.Recordset.MoveNext
Loop
If Data1.Recordset.EOF Then
MsgBox "查无此系统人员!!"
txtUserName.SetFocus
txtUserName.SelStart = 0
txtUserName.SelLength = Len(txtUserName.Text)
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?