📄 frmlogin.frm
字号:
VERSION 5.00
Object = "{065E6FD1-1BF9-11D2-BAE8-00104B9E0792}#3.0#0"; "SSA3D30.OCX"
Object = "{8C3D4AA0-2599-11D2-BAF1-00104B9E0792}#3.0#0"; "SSSPLT30.OCX"
Begin VB.Form frmLogin
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 3270
ClientLeft = 0
ClientTop = 0
ClientWidth = 5070
LinkTopic = "Form1"
ScaleHeight = 3270
ScaleWidth = 5070
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin SSSplitter.SSSplitter SSSplitter1
Height = 3255
Left = 0
TabIndex = 1
Top = 0
Width = 5055
_ExtentX = 8916
_ExtentY = 5741
_Version = 196610
BorderStyle = 0
PaneTree = "frmLogin.frx":0000
Begin Threed.SSPanel SSPanel1
Height = 3255
Left = 0
TabIndex = 2
Top = 0
Width = 5055
_ExtentX = 8916
_ExtentY = 5741
_Version = 196610
PictureBackgroundStyle= 2
BevelInner = 1
RoundedCorners = 0 'False
FloodShowPct = -1 'True
Begin VB.TextBox txtNo
Height = 315
Left = 1954
TabIndex = 0
Top = 443
Width = 2295
End
Begin VB.TextBox txtPassword
Height = 315
IMEMode = 3 'DISABLE
Left = 1954
PasswordChar = "*"
TabIndex = 3
Top = 983
Width = 2295
End
Begin Threed.SSCommand cmdCancel
Height = 435
Left = 2546
TabIndex = 4
Top = 2393
Width = 1485
_ExtentX = 2619
_ExtentY = 767
_Version = 196610
PictureFrames = 1
BackStyle = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Picture = "frmLogin.frx":0038
Caption = "退出/结束(&X)"
Alignment = 4
ButtonStyle = 3
PictureAlignment= 1
End
Begin Threed.SSCommand cmdOK
Height = 435
Left = 1046
TabIndex = 5
Top = 2393
Width = 1035
_ExtentX = 1826
_ExtentY = 767
_Version = 196610
PictureFrames = 1
BackStyle = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Picture = "frmLogin.frx":0192
Caption = "确定(&Y)"
Alignment = 4
ButtonStyle = 3
PictureAlignment= 1
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "操作员密码"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 1
Left = 821
TabIndex = 8
Top = 1043
Width = 975
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "操作员编号"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 0
Left = 821
TabIndex = 7
Top = 533
Width = 975
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "在密码框输入“SETPASS”可更改密码"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 896
TabIndex = 6
Top = 1733
Width = 3270
End
End
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'##ModelId=3D338A0600AC
Private loginSuccess As Boolean
'##ModelId=3D338A0600FD
Private m_Operator As String
'##ModelId=3D338A06014D
Private m_OperateLevel As String
'##ModelId=3D338A060201
Public Property Get OperateLevel() As String
OperateLevel = m_OperateLevel
End Property
'##ModelId=3D338A06019D
Public Property Let OperateLevel(ByVal Value As String)
m_OperateLevel = Value
End Property
'##ModelId=3D338A0602AB
Public Property Get Operator() As String
Operator = m_Operator
End Property
'##ModelId=3D338A060233
Public Property Let Operator(ByVal Value As String)
m_Operator = Value
End Property
'##ModelId=3D338A0602DD
Private Sub cmdCancel_Click()
End
End Sub
'##ModelId=3D338A060305
Private Sub cmdOk_Click()
'<EhHeader>
On Error GoTo cmdOk_Click_Err
'</EhHeader>
If txtPassword.Text = "" Then
txtPassword.SetFocus
Exit Sub
End If
Dim cOP As New rsclsOperator
Dim bndOP As New BindingCollection
Dim cAllOp As New rsclsOperator
Dim bndAllOp As New BindingCollection
If txtNO.Text = "" Then
Exit Sub
End If
cOP.Query_Alias = txtNO.Text
With bndOP
.DataMember = "byalias"
Set .DataSource = cOP
End With
If cOP.EOF And cOP.BOF Then
With bndAllOp
.DataMember = ""
Set .DataSource = cAllOp
End With
If cAllOp.EOF And cAllOp.BOF Then
OperatorID = 9999
Operator = "SysSetup"
OperateLevel = "系统级"
loginSuccess = True
Unload Me
Exit Sub
Else
MsgBox "该操作员不存在,请重新输入。", vbOKOnly, "提示"
txtNO.Text = ""
txtNO.SetFocus
Exit Sub
End If
End If
If LCase(txtPassword.Text) = "setpass" Then
frmChangePWD.OldPWD = LCase(cOP.Password)
frmChangePWD.Show vbModal
If frmChangePWD.Unchange Then
txtPassword.Text = ""
Exit Sub
Else
cOP.Password = LCase(frmChangePWD.NewPWD)
cOP.Update
OperatorID = cOP.Alias
Operator = cOP.Operator
OperateLevel = cOP.OperateLevel
loginSuccess = True
Unload Me
Exit Sub
End If
End If
If LCase(txtPassword.Text) = RTrim(LTrim(LCase(cOP.Password))) Then
Operator = cOP.Operator
OperatorID = cOP.Alias
OperateLevel = cOP.OperateLevel
loginSuccess = True
Unload Me
Exit Sub
Else
MsgBox "密码错误,请重新输入。", vbOKOnly, "提示"
txtPassword.Text = ""
txtPassword.SetFocus
Exit Sub
End If
Set cOP = Nothing
Set cAllOp = Nothing
Set bndOP = Nothing
Set bndAllOp = Nothing
'<EhFooter>
Exit Sub
cmdOk_Click_Err:
LockErrorShow
End Sub
'##ModelId=3D338A060337
Private Sub Form_Load()
Me.Top = (Screen.Height - Me.Height) / 2
Me.Left = (Screen.Width - Me.Width) / 2
SSPanel1.PictureBackground = mainForm.Pic.Picture
SSPanel1.PictureBackgroundStyle = ssTiled
If Day(Now) = 15 Or Day(Now) = 28 Then
MsgBox "请以北京时间为准校正电脑时间", vbOKOnly, "系统提示"
End If
End Sub
'##ModelId=3D338A06035F
Private Sub Form_Unload(Cancel As Integer)
If Not loginSuccess Then
End
End If
End Sub
'##ModelId=3D338A0603B0
Private Sub txtNo_KeyDown(KeyCode As Integer, Shift As Integer)
Dim ddd As Long
If KeyCode = vbKeyReturn Then
txtPassword.Text = ""
txtPassword.SetFocus
' ddd = SmartRead_Speak("操作员编号为" & txtNo.Text, 11, 0, -1, -1, 0, "http://denggao.vipip.net")
End If
End Sub
'##ModelId=3D338A07004A
Private Sub txtPassword_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
cmdOK.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -