?? frm登錄.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm登錄
Caption = "用戶名:admin 密碼:528"
ClientHeight = 3630
ClientLeft = 60
ClientTop = 405
ClientWidth = 3420
LinkTopic = "Form2"
ScaleHeight = 3630
ScaleWidth = 3420
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 600
Top = 3240
Width = 2055
_ExtentX = 3625
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 2
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "FILE NAME=D:\桌面\客戶管理系統\用戶管理表.dsn"
OLEDBString = ""
OLEDBFile = "D:\桌面\客戶管理系統\用戶管理表.dsn"
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.TextBox Text2
Alignment = 2 'Center
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
IMEMode = 3 'DISABLE
Left = 1200
MaxLength = 6
PasswordChar = "*"
TabIndex = 4
Top = 570
Width = 1920
End
Begin VB.CommandButton Cmd1
BackColor = &H00FF8080&
Caption = "確定(&O)"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 600
MaskColor = &H00FF8080&
Style = 1 'Graphical
TabIndex = 3
Top = 1560
UseMaskColor = -1 'True
Width = 1000
End
Begin VB.CommandButton Cmd2
BackColor = &H00FF8080&
Caption = "退出(&X)"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 1920
Style = 1 'Graphical
TabIndex = 2
Top = 1560
Width = 1000
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frm登錄.frx":0000
Left = 1200
List = "frm登錄.frx":0002
TabIndex = 1
Text = "admin"
Top = 120
Width = 1935
End
Begin VB.TextBox Text1
DataField = "密碼"
DataSource = "Adodc1"
Height = 375
Left = 960
TabIndex = 0
Text = "Text1"
Top = 2400
Width = 1455
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用戶名: "
BeginProperty Font
Name = "黑體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 240
TabIndex = 7
Top = 120
Width = 1095
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "密 碼: "
BeginProperty Font
Name = "黑體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 240
TabIndex = 6
Top = 630
Width = 855
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "溫馨提示:請用戶登陸后修改密碼。"
ForeColor = &H00FF0000&
Height = 255
Left = 120
TabIndex = 5
Top = 1200
Width = 2895
End
End
Attribute VB_Name = "frm登錄"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public TIM As Integer
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text2.SetFocus
Else
End If
End Sub
Private Sub Form_Activate()
Combo1.SetFocus
End Sub
Private Sub Form_Load()
TIM = 0
frm主窗體.StatusBar1.Panels(1) = Me.Caption
Adodc1.RecordSource = "select * from 用戶管理表 "
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Do While Adodc1.Recordset.EOF = False
Combo1.AddItem (Adodc1.Recordset.Fields("用戶名稱"))
Adodc1.Recordset.MoveNext
Loop
Else
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm主窗體.Enabled = True
frm主窗體.StatusBar1.Panels(1) = "楊揚工作室 作者:小楊"
End Sub
Private Sub DBCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text2.SetFocus
End If
If KeyCode = vbKeyDown Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Cmd1.Visible = True
Cmd1.SetFocus
End If
If KeyCode = vbKeyUp Then
DBCombo1.SetFocus
DBCombo1.SelLength = Len(DBCombo1.Text)
End If
If KeyCode = vbKeyDown Then
Cmd1.Visible = True
Cmd1.SetFocus
End If
End Sub
Private Sub cmd1_Click()
Dim MESSAGE As String
Adodc1.RecordSource = "select * from 用戶管理表 where (用戶管理表.用戶名稱 like " + Chr(34) + Combo1.Text + Chr(34) + ")"
Adodc1.Refresh
Adodc1.RecordSource = "select * from 用戶管理表 where 用戶名稱='" + Combo1.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If Combo1.Text <> "" And Trim(Text2.Text) = Trim(Text1.Text) Then
frm主窗體.StatusBar1.Panels(2).Text = "當前系統用戶:" & Trim(Combo1.Text)
Name1 = Trim(Combo1.Text)
frm主窗體.Check1.Value = Adodc1.Recordset.Fields("基本信息管理")
frm主窗體.Check2.Value = Adodc1.Recordset.Fields("客戶信息管理")
frm主窗體.Check3.Value = Adodc1.Recordset.Fields("客戶信息查詢")
frm主窗體.Check5.Value = Adodc1.Recordset.Fields("系統設置")
Load frm主窗體
frm主窗體.Show
Unload Me
Else
MsgBox "沒有此操作員的信息或者輸入的密碼錯誤,請您確認后重新輸入"
Text2.Text = ""
Text2.SetFocus
End If
Else
MsgBox "沒有此操作員的信息或者輸入的密碼錯誤,請您確認后重新輸入"
Combo1.Text = ""
Text2.Text = "'"
Combo1.SetFocus
End If
End Sub
Private Sub cmd2_Click()
End
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -