📄 f_long.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{3A6644DE-3402-11D9-9DE7-C33FAA87690A}#1.0#0"; "WinXPCEngine.ocx"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Begin VB.Form F_LONG
BorderStyle = 3 'Fixed Dialog
ClientHeight = 6405
ClientLeft = 1110
ClientTop = 1290
ClientWidth = 10005
ControlBox = 0 'False
LinkTopic = "Form2"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 6405
ScaleWidth = 10005
ShowInTaskbar = 0 'False
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 255
Left = -45
TabIndex = 4
Top = 5685
Width = 10095
_ExtentX = 17806
_ExtentY = 450
_Version = 393216
Appearance = 0
End
Begin VB.Frame Frame1
Height = 530
Left = 0
TabIndex = 5
Top = 5880
Width = 10000
Begin VB.TextBox Text3
Alignment = 2 'Center
BackColor = &H00C0E0FF&
ForeColor = &H00C00000&
Height = 270
Left = 720
Locked = -1 'True
MaxLength = 12
TabIndex = 9
Top = 180
Width = 1335
End
Begin VB.TextBox Text2
Alignment = 2 'Center
Enabled = 0 'False
Height = 270
IMEMode = 3 'DISABLE
Left = 5040
MaxLength = 12
PasswordChar = "*"
TabIndex = 1
Top = 180
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "取消(&Q)"
Height = 375
Left = 8400
TabIndex = 3
TabStop = 0 'False
Top = 120
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "确定(&O)"
Enabled = 0 'False
Height = 375
Left = 6840
TabIndex = 2
Top = 120
Width = 1455
End
Begin VB.TextBox Text1
Alignment = 2 'Center
BackColor = &H00C0FFC0&
Enabled = 0 'False
Height = 270
IMEMode = 3 'DISABLE
Left = 2880
MaxLength = 12
TabIndex = 0
Top = 180
Width = 1335
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "口令"
Height = 180
Left = 4560
TabIndex = 8
Top = 240
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "代码"
Height = 180
Left = 2400
TabIndex = 7
Top = 240
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户"
Height = 180
Left = 240
TabIndex = 6
Top = 240
Width = 360
End
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 5640
Left = 0
Picture = "F_LONG.frx":0000
ScaleHeight = 5610
ScaleWidth = 9960
TabIndex = 10
Top = 0
Width = 9985
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 10
Left = 0
Top = 5160
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 0
Top = 4680
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_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= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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 WinXPC_Engine.WindowsXPC WindowsXPC1
Left = 480
Top = 5040
_ExtentX = 6588
_ExtentY = 1085
ColorScheme = 2
Common_Dialog = 0 'False
End
Begin VB.Label Label4
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
ForeColor = &H80000004&
Height = 180
Left = 6960
TabIndex = 11
Top = 5360
Width = 90
End
End
End
Attribute VB_Name = "F_LONG"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public UserCode As String '用户代码
Public UserName As String '用户名称
Public UserPass As String '用户口令
Public UserPower As String '用户权限
Private Sub Command1_Click()
UserCode = Text1.Text
UserPass = Text2.Text
On Error GoTo ERR1
With Adodc1
.ConnectionString = Conn
.RecordSource = "SELECT * FROM 操作员字典 WHERE 代码='" & UserCode & "' AND 口令='" & UserPass & "'"
.Refresh
End With
If Adodc1.Recordset.AbsolutePosition = adPosUnknown Then
Ckjg = MsgBox("口令错误,请重新输入!", vbOKOnly + vbInformation)
If Ckjg <> vbOKOnly Then
With Text2
.SetFocus
.Text = ""
End With
UserPass = ""
End If
Else
UserPower = Adodc1.Recordset.Fields("权限代码")
F_SRF.Show
Unload Me
End If
Exit Sub
ERR1:
MsgBox "系统配置错误!无法与服务器连接!", vbOKOnly + vbInformation
UserPower = "A"
Unload Me
F_YCSZ.Show
End Sub
Private Sub Command1_GotFocus()
Text2.BackColor = &HFFFFFF
Text1.BackColor = &HFFFFFF
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
WindowsXPC1.InitSubClassing
Timer1.Enabled = True
With Adodc1
.ConnectionString = Conn
.RecordSource = "SELECT * FROM 操作员字典 WHERE 代码='" & UserCode & "' AND 口令='" & UserPass & "'"
.Refresh
End With
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Label4.Caption = "易通汽车修理信息管理系统 " & App.Major & "." & App.Minor & "." & App.Revision
End Sub
Private Sub Text1_GotFocus()
Text2.BackColor = &HFFFFFF
Text1.BackColor = &HC0FFC0
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = Asc(vbCr) Then Yhm 'Enter键
End Sub
Private Sub Text2_Change()
Command1.Enabled = True
End Sub
Private Sub Text2_GotFocus()
Text1.BackColor = &HFFFFFF
Text2.BackColor = &HC0FFC0
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = Asc(vbCr) Then Command1_Click 'Enter键
End Sub
Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1.Value + 2
If ProgressBar1.Value = 100 Then
With Text1
.Enabled = True
.SetFocus
End With
Text2.Enabled = True
Timer1.Enabled = False
End If
End Sub
Private Sub Yhm()
On Error GoTo ERR1
With Adodc1
.ConnectionString = Conn
.RecordSource = "SELECT 用户 FROM [操作员字典] WHERE 代码 ='" & Text1.Text & "'"
.Refresh
End With
UserName = Adodc1.Recordset.Fields("用户")
Text3.Text = UserName
With Text2
.SetFocus
.Text = ""
End With
Exit Sub
ERR1:
MsgBox "代码输入错误!", vbOKOnly + vbInformation
With Text1
.SetFocus
.Text = ""
End With
Text2.Text = ""
Text3.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -