📄 frmlogin.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form Frmlogin
AutoRedraw = -1 'True
BorderStyle = 0 'None
Caption = "管理员登陆"
ClientHeight = 6015
ClientLeft = 0
ClientTop = 0
ClientWidth = 8175
LinkTopic = "Form1"
ScaleHeight = 6015
ScaleWidth = 8175
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin MainProject.QQForm QQForm1
Height = 6015
Left = 0
TabIndex = 0
Top = 0
Width = 8175
_extentx = 14420
_extenty = 10610
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "Frmlogin.frx":0000
Height = 330
Left = 4800
TabIndex = 6
Top = 3480
Width = 1935
_ExtentX = 3413
_ExtentY = 582
_Version = 393216
ListField = "管理员名称"
Text = "管理员"
End
Begin MSAdodcLib.Adodc Adodc1
Height = 495
Left = 5640
Top = 5280
Visible = 0 'False
Width = 2055
_ExtentX = 3625
_ExtentY = 873
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 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\SQL数据库设计\data\db.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\SQL数据库设计\data\db.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 管理员表"
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 MainProject.QQButton QQButton2
Height = 375
Left = 5640
TabIndex = 5
Top = 4680
Width = 1095
_extentx = 1931
_extenty = 661
caption = "取消"
font = "Frmlogin.frx":0015
End
Begin MainProject.QQButton QQButton1
Height = 375
Left = 4320
TabIndex = 4
Top = 4680
Width = 1095
_extentx = 1931
_extenty = 661
caption = "登陆"
font = "Frmlogin.frx":0039
End
Begin VB.TextBox Txtpwd
Height = 375
IMEMode = 3 'DISABLE
Left = 4800
PasswordChar = "*"
TabIndex = 3
Top = 4080
Width = 1935
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密 码:"
Height = 180
Index = 1
Left = 4080
TabIndex = 2
Top = 4080
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户名:"
Height = 180
Index = 0
Left = 4080
TabIndex = 1
Top = 3480
Width = 720
End
End
End
Attribute VB_Name = "Frmlogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Adminname As String
Public AdminQX As String
Dim temp As Integer
Private Sub Form_Load()
temp = 1
End Sub
Private Sub QQButton1_Click()
If temp > 3 Then
MsgBox "你已连续输错3次,系统自动退出!", vbOKOnly, "提示"
End
End If
Adodc1.RecordSource = "select * from 管理员表 where 管理员名称='" & DataCombo1.BoundText & "' and 管理员密码='" & Txtpwd.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.EOF Or Adodc1.Recordset.BOF Then
temp = temp + 1
MsgBox "用户名或密码错误!", vbOKOnly, "提示"
Exit Sub
Else
Adminname = Adodc1.Recordset.Fields(0)
AdminQX = Adodc1.Recordset.Fields(2)
Unload Me
FrmMain.Show
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -