📄 frmlogin.frm
字号:
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "Tabctl32.ocx"
Begin VB.Form frmLogin
BorderStyle = 3 'Fixed Dialog
ClientHeight = 3360
ClientLeft = 45
ClientTop = 45
ClientWidth = 6120
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3360
ScaleWidth = 6120
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Visible = 0 'False
Begin TabDlg.SSTab SSTab1
Height = 3135
Left = 120
TabIndex = 0
Top = 120
Width = 5895
_ExtentX = 10398
_ExtentY = 5530
_Version = 393216
Tabs = 1
TabsPerRow = 1
TabHeight = 520
TabCaption(0) = " "
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "Frame2"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).Control(1)= "Frame1"
Tab(0).Control(1).Enabled= 0 'False
Tab(0).ControlCount= 2
Begin VB.Frame Frame1
Height = 2355
Left = 120
TabIndex = 3
Top = 120
Width = 5655
Begin VB.Timer Timer1
Interval = 1
Left = 5190
Top = 1680
End
Begin VB.CommandButton btnCancel
Cancel = -1 'True
Caption = "&Cancel"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3135
TabIndex = 7
Top = 1620
Width = 975
End
Begin VB.CommandButton btnLogin
Caption = "&Login"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1695
TabIndex = 6
Top = 1635
Width = 975
End
Begin VB.TextBox txtPassword
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
IMEMode = 3 'DISABLE
Left = 2370
PasswordChar = "*"
TabIndex = 5
Top = 1140
Width = 2415
End
Begin VB.TextBox txtUserName
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 2370
TabIndex = 4
Top = 660
Width = 2415
End
Begin VB.Label lblLogIn
AutoSize = -1 'True
Caption = "Login succeeded initializing Application..."
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 195
Left = 1140
TabIndex = 11
Top = 2040
Visible = 0 'False
Width = 3480
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Enter Login ID && Password To Start or <ESC> To Close"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 195
Left = 360
TabIndex = 10
Top = 180
Width = 4770
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Password"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 195
Left = 1170
TabIndex = 9
Top = 1185
Width = 930
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Login ID"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 195
Left = 1170
TabIndex = 8
Top = 750
Width = 810
End
End
Begin VB.Frame Frame2
Height = 435
Left = 120
TabIndex = 1
Top = 2520
Width = 5655
Begin VB.Label lblProgress
AutoSize = -1 'True
BeginProperty Font
Name = "Webdings"
Size = 8.25
Charset = 2
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 255
Left = 60
TabIndex = 2
Top = 120
Width = 90
End
End
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim gblI
Option Explicit
Private Sub btnCancel_Click()
CNimanager.Close
Set CNimanager = Nothing
End
End Sub
Private Sub btnLogin_Click()
Call Verify_Login(fnEscapeQuote(txtUserName), fnEscapeQuote(txtPassword))
If Not Trim(glbLoginId) = "" Then
'frmTop.SetFocus
End If
End Sub
Private Sub Form_Load()
gblI = 0
Timer1.Enabled = False
End Sub
Private Sub Form_Paint()
txtUserName.SetFocus
End Sub
Private Sub Timer1_Timer()
lblLogIn.Visible = True
lblProgress.Caption = lblProgress.Caption & "g"
gblI = gblI + 1
If gblI = 34 And Timer1.Enabled = True Then
Timer1.Enabled = False
Unload Me
frmTop.Show
End If
End Sub
Private Sub txtPassword_Change()
btnLogin.Enabled = Len(Trim(txtPassword.Text)) > 0
End Sub
Private Sub txtPassword_GotFocus()
txtPassword.BackColor = RGB(200, 200, 200)
txtUserName.BackColor = RGB(255, 255, 255)
End Sub
Private Sub txtPassword_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If btnLogin.Enabled = True Then
btnLogin_Click
End If
Else
txtPassword.SetFocus
End If
End Sub
Private Sub txtPassword_LostFocus()
txtPassword.BackColor = RGB(255, 255, 255)
End Sub
Private Sub txtUserName_GotFocus()
txtUserName.BackColor = RGB(200, 200, 200)
End Sub
Private Sub txtUserName_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtPassword.SetFocus
End If
End Sub
Private Sub txtUserName_LostFocus()
txtUserName.BackColor = RGB(255, 255, 255)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -