📄 frmlogin.frm
字号:
VERSION 5.00
Object = "{E95A2510-F3D1-416D-823B-4F840FE98091}#3.0#0"; "COMMAND.OCX"
Begin VB.Form frmLogin
BackColor = &H00FFC0FF&
BorderStyle = 3 'Fixed Dialog
Caption = "订单管理系统——用户登陆"
ClientHeight = 1860
ClientLeft = 45
ClientTop = 330
ClientWidth = 4230
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1860
ScaleWidth = 4230
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "C:\Documents and Settings\Administrator\My Documents\订单管理系统2\Order.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 285
Left = -240
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 1440
Visible = 0 'False
Width = 1140
End
Begin VB.ComboBox cb1_name
Height = 300
ItemData = "frmLogin.frx":0000
Left = 1680
List = "frmLogin.frx":0010
TabIndex = 5
Top = 240
Width = 2295
End
Begin VB.TextBox txtPassword
Height = 345
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 2
Top = 600
Width = 2325
End
Begin CSCommand.Command cmdOk
Height = 375
Left = 960
TabIndex = 3
Top = 1200
Width = 975
_ExtentX = 1720
_ExtentY = 661
Icon = "frmLogin.frx":0029
Caption = "确定"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Appearance = 2
BackStyle = 0
End
Begin CSCommand.Command cmdCancel
Height = 375
Left = 2640
TabIndex = 4
Top = 1200
Width = 975
_ExtentX = 1720
_ExtentY = 661
Icon = "frmLogin.frx":0343
Caption = "取消"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Appearance = 2
BackStyle = 0
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "密 码(&P):"
Height = 270
Index = 1
Left = 480
TabIndex = 1
Top = 720
Width = 1080
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "用户名称(&U):"
Height = 270
Index = 0
Left = 480
TabIndex = 0
Top = 240
Width = 1080
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim sSQL, sirname, sirpwd As String
Private Sub From_Initialize()
Data1.Recordset.MoveFirst
cb1_name.Clear
Do While Not Data1.Recordset.EOF
cb1_name.AddItem Data1.Recordset.Fields(1)
Data1.Recordset.MoveNext
Loop
End Sub
Private Sub Cbl_name_Change()
End Sub
Private Sub cmdOK_Click()
'检查正确的密码
sirname = Trim$(cb1_name.Text)
sirpwd = UCase$(Trim$(txtPassword))
sSQL = "select * from 密码表 where UserName='" & sirname & "'and PassWord='" & sirpwd & "'"
Data1.RecordSource = sSQL
Data1.Refresh
If Data1.Recordset.RecordCount > 0 Then
Unload Me
Unload frmLogin
MDIFrmMain.Show
Else
MsgBox "密码无效,请重试!", , "登陆"
txtPassword.SetFocus
txtPassword = ""
End If
End Sub
Private Sub txtPassword_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then cmdOK_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -