?? frmlogin.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmLogin
BackColor = &H8000000A&
BorderStyle = 3 'Fixed Dialog
Caption = "系統登錄"
ClientHeight = 3735
ClientLeft = 45
ClientTop = 330
ClientWidth = 6240
Icon = "frmLogin.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "frmLogin.frx":1C7A
ScaleHeight = 3735
ScaleWidth = 6240
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text2
BorderStyle = 0 'None
Height = 330
IMEMode = 3 'DISABLE
Left = 4260
PasswordChar = "*"
TabIndex = 1
Top = 1965
Width = 1485
End
Begin VB.TextBox Text1
BorderStyle = 0 'None
Height = 330
Left = 4260
TabIndex = 0
Top = 1515
Width = 1485
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 360
Top = 3885
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\程序修改\車輛管理系統\program\clgl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\程序修改\車輛管理系統\program\clgl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 權限表 "
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Height = 345
Left = 4770
TabIndex = 3
Top = 2730
Width = 960
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Height = 345
Left = 3585
TabIndex = 2
Top = 2730
Width = 960
End
Begin VB.Image Image1
Height = 3750
Left = 0
Picture = "frmLogin.frx":4793
Stretch = -1 'True
Top = 0
Width = 6225
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************************************************************************
'**模 塊 名:frmLogin
'**版權說明:吉林省明日科技有限公司享有本軟件的所有版權,如果本軟件用于商
'** 業用途,必須經過吉林省明日科技有限公司授權。如果提供網上免費
'** 下載,必須經過吉林省明日科技有限公司授權,并保證程序的完整,
'** 不得修改代碼、注釋和相關內容,否則,我公司將追究其法律責任
'**網 址:www.mingrisoft.com 價值無限,服務無限
'**電 話:(0431)84978981,84978982
'**創 建 人:明日科技
'**日 期:2007-10-31
'**修 改 人:mraj
'**日 期:2007-10-31
'**描 述:
'*************************************************************************
Dim i As Integer
Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then '按回車鍵Command1獲得焦點
Command1.SetFocus
End If
End Sub
Private Sub Form_Load()
'自動識別路徑
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from 權限表 "
Adodc1.Refresh
End Sub
Private Sub Label1_Click() '登陸
'驗證操作員及密碼
Adodc1.RecordSource = "select * from 權限表 where 用戶名='" + Text1.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "操作員輸入錯誤!", , "車輛管理系統"
ElseIf Adodc1.Recordset.RecordCount > 0 Then
If Text1.Text <> "" And Text2.Text <> "" And Text2.Text = Adodc1.Recordset.Fields("密碼") Then
Load MDIForm1 '顯示主窗體
MDIForm1.Show
op = Adodc1.Recordset.Fields("用戶名")
Unload Me
Else
If TIM = 3 Then '密碼輸錯3次,退出系統
myval = MsgBox("密碼輸入錯誤,請向系統管理員查詢!", 0, "車輛管理系統")
If myval = vbOK Then End
End If
If Text1.Text = "" Then
MsgBox ("請輸入用戶名!")
Text1.SetFocus
Else
If Text1.Text <> Adodc1.Recordset.Fields("用戶名") Then
MsgBox ("查無此用戶,請重新輸入用戶名!")
Text1.SetFocus
Else
If Text2.Text = "" Then
MsgBox ("請輸入用戶密碼!")
Text2.SetFocus
Else
If Text2.Text <> Adodc1.Recordset.Fields("密碼") Then
MsgBox ("密碼錯誤,請重新輸入密碼!")
TIM = TIM + 1
Text2.SetFocus
End If
End If
End If
End If
End If
End If
End Sub
Private Sub Label2_Click() '取消
Unload Me
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then '按回車鍵Text2獲得焦點
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then '按回車鍵調用Label1_Click()事件
Label1_Click
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -