📄 frmlogin.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmLogin
BackColor = &H000000C0&
BorderStyle = 3 'Fixed Dialog
Caption = "Login"
ClientHeight = 1560
ClientLeft = 2835
ClientTop = 3480
ClientWidth = 5760
Icon = "frmLogin.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 921.699
ScaleMode = 0 'User
ScaleWidth = 5408.328
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.TextBox Text1
DataField = "login"
DataSource = "Adodc1"
Height = 285
Left = 3840
TabIndex = 6
Text = "Text1"
Top = 2280
Width = 150
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 2280
Top = 2280
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= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=Relience"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "Relience"
OtherAttributes = ""
UserName = "admin"
Password = ""
RecordSource = "select * from login"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox txtUserName
Height = 345
Left = 3090
TabIndex = 1
Top = 150
Width = 2325
End
Begin VB.CommandButton cmdOK
Caption = "OK"
Default = -1 'True
Height = 390
Left = 2640
TabIndex = 4
Top = 1080
Width = 1140
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "Cancel"
Height = 390
Left = 3960
TabIndex = 5
Top = 1080
Width = 1140
End
Begin VB.TextBox txtPassword
Height = 345
IMEMode = 3 'DISABLE
Left = 3090
PasswordChar = "*"
TabIndex = 3
Top = 540
Width = 2325
End
Begin VB.Image Image1
Height = 1575
Left = 0
Picture = "frmLogin.frx":0442
Stretch = -1 'True
Top = 0
Width = 1575
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
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 = &H00FFFFFF&
Height = 270
Index = 0
Left = 1905
TabIndex = 0
Top = 165
Width = 1080
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
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 = &H00FFFFFF&
Height = 270
Index = 1
Left = 1905
TabIndex = 2
Top = 555
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
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
If UCase(txtUserName) = UCase(Adodc1.Recordset.Fields(0)) Then
If IsNull(Adodc1.Recordset.Fields(1)) = True Then
Adodc1.Recordset.Fields(1) = ""
End If
If txtPassword = Adodc1.Recordset.Fields(1) Then
If txtUserName = "ADMIN" Or txtUserName = "Administrator" Then
is_admin = True
End If
Unload Me
frmSplash.Show
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
Else
MsgBox "Invalid Login, try again!", , "Login"
txtUserName.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub
Private Sub Form_activate()
txtUserName = "ADMIN"
txtPassword.SetFocus
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -