📄 frmlogin.frm
字号:
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 15
Top = 240
Width = 2415
End
Begin VB.Label lbljam
Alignment = 2 'Center
Caption = "00:00:00"
BeginProperty DataFormat
Type = 1
Format = "h:mm:ss AMPM"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 4
EndProperty
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3960
TabIndex = 13
Top = 240
Width = 1095
End
End
Begin VB.TextBox txtUserName
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 2280
TabIndex = 4
Top = 840
Width = 2325
End
Begin VB.TextBox txtPassword
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
IMEMode = 3 'DISABLE
Left = 2280
PasswordChar = "*"
TabIndex = 5
Top = 1320
Width = 2325
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 2280
Top = 3120
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
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=C:\callcenter\callcenter.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\callcenter\callcenter.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "Users"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label2
Caption = "&User Type :"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000C&
Height = 255
Left = 960
TabIndex = 11
Top = 1800
Width = 1095
End
Begin VB.Label Label1
Caption = "&User Name :"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000C&
Height = 255
Left = 960
TabIndex = 10
Top = 840
Width = 1095
End
Begin VB.Label lblLabels
Caption = "&Password :"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000C&
Height = 270
Index = 1
Left = 960
TabIndex = 9
Top = 1320
Width = 1080
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public LoginSucceeded As Boolean
Dim mb
Private Sub cmdCancel_Click()
LoginSucceeded = False
txtUserName.Text = ""
txtPassword.Text = ""
cboUserType.Text = "---Select User Type---"
frmLogin.Refresh
'End
End Sub
Private Sub cmdExit_Click()
If (MsgBox("Are you sure you want to exit?", vbOKCancel + vbQuestion, "Exit CCMS?")) = vbOK Then
End
End If
End Sub
Private Sub cmdOK_Click()
Adodc1.Refresh
Adodc1.Recordset.Find "Username =" & "'" & txtUserName & "'"
If (txtPassword = txtPassword2 And Len(txtPassword) > 0) And (cboUserType.Text = txtUserType) Then
Me.Hide
frmMain.Show
Else
mb = MsgBox("Invalid username or Password.", vbCritical, "Login Error. Try Again !!!")
txtUserName.SetFocus
SendKeys "{Home}+{End}"
End If
Adodc1.Recordset.Find "Username =" & "'" & txtUserName & "'"
If (txtPassword = txtPassword2 And Len(txtPassword) > 0) And (cboUserType.Text = "Administrator") Then
frmAdmin.Show
frmMain.cmdLogIN.Value = True
End If
End Sub
Private Sub Form_Load()
cboUserType.AddItem "Manager"
cboUserType.AddItem "Team Leader"
cboUserType.AddItem "Senior Agent"
cboUserType.AddItem "Agent"
cboUserType.AddItem "Administrator"
End Sub
Private Sub Frame2_Click()
End
End Sub
Private Sub timjam_Timer()
Dim jam_tanggal As Variant
Dim jam_time As Variant
jam_time = Now
lblhari.Caption = Format(jam_time, "dddd")
lbljam.Caption = Format(jam_time, "hh:mm:ss")
lbltanggal.Caption = Format(jam_time, "d mmmm yyyy")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -