📄 sysmaintalogin.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form6
Caption = "系统维护登录对话框"
ClientHeight = 2655
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form6"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 2655
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 2520
Top = 0
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_ExtentY = 661
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 = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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.CommandButton Command2
Caption = "退出"
Height = 375
Left = 2400
TabIndex = 5
Top = 1920
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定"
Default = -1 'True
Height = 375
Left = 960
TabIndex = 4
Top = 1920
Width = 1095
End
Begin VB.TextBox txtpass
Height = 380
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "@"
TabIndex = 3
Top = 1120
Width = 1800
End
Begin VB.TextBox txtadmini
Height = 380
Left = 1800
TabIndex = 2
Top = 400
Width = 1800
End
Begin VB.Label Label2
Caption = "管理员密码"
Height = 375
Left = 360
TabIndex = 1
Top = 1200
Width = 1095
End
Begin VB.Label Label1
Caption = "管理员名称"
Height = 375
Left = 360
TabIndex = 0
Top = 480
Width = 1095
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Len(txtadmini.Text) = 0 Then
MsgBox ("用户名不能为空,请输入!")
txtadmini.SetFocus
Else
If Len(txtpass.Text) = 0 Then
MsgBox ("密码不能为空,请输入!")
txtpass.SetFocus
Else
Adodc1.RecordSource = "select * from 用户表 where 用户名='" & txtadmini.Text & "' and 密码='" & txtpass & "' and 角色='系统用户'"
Adodc1.Refresh
If Adodc1.Recordset.EOF Then
MsgBox ("对不起,您不是系统管理员,没有此权限!")
txtadmini.Text = ""
txtpass.Text = ""
txtadmini.SetFocus
Else
Form7.Show
Adodc1.Recordset.Close
Unload Me
End If
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\学生成绩管理.mdb;Persist Security Info=False"
Adodc1.CommandType = adCmdUnknown
Adodc1.RecordSource = "select * from 学生表 order by 学号"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -