📄 manager.frm
字号:
VERSION 5.00
Begin VB.Form manager
Caption = "教师登录"
ClientHeight = 3825
ClientLeft = 60
ClientTop = 450
ClientWidth = 6720
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3825
ScaleWidth = 6720
StartUpPosition = 2 'CenterScreen
Begin VB.Frame Frame1
Height = 3810
Left = 0
TabIndex = 0
Top = 0
Width = 6720
Begin VB.Frame Frame2
Caption = "教师登录"
Height = 2175
Left = 360
TabIndex = 3
Top = 840
Width = 5895
Begin VB.TextBox Text1
DataSource = "Adodc1"
Height = 375
Index = 0
Left = 1920
TabIndex = 1
Top = 720
Width = 2055
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 4320
TabIndex = 5
Top = 720
Width = 855
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 4320
TabIndex = 4
Top = 1200
Width = 855
End
Begin VB.TextBox Text1
DataSource = "Adodc1"
Height = 375
IMEMode = 3 'DISABLE
Index = 1
Left = 1920
PasswordChar = "*"
TabIndex = 2
Top = 1200
Width = 2055
End
Begin VB.Label Label1
Caption = "用户名"
Height = 255
Left = 1080
TabIndex = 7
Top = 840
Width = 975
End
Begin VB.Label Label2
Caption = "口 令"
Height = 255
Left = 1080
TabIndex = 6
Top = 1320
Width = 615
End
End
Begin VB.Label lblCompanyProduct
AutoSize = -1 'True
Caption = "试卷生成和评分系统"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 1800
TabIndex = 8
Top = 360
Width = 2295
End
End
End
Attribute VB_Name = "manager"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public n As Integer
Dim str As String
Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
txtsql = "select * from 权限表 where 用户名='" & _
Trim$(Text1(0).Text) & "'" & " and 密码='" & Trim$(Text1(1).Text) + "'"
Set mrc = exesql(txtsql)
If mrc.RecordCount = 0 Then
n = n + 1
If n < 3 Then
MsgBox "没有这个用户,继续登录", vbOKOnly + vbExclamation, "信息提示"
Text1(0).Text = ""
Text1(1).Text = ""
Text1(0).SetFocus
Else
MsgBox "已登录失败三次,退出系统", vbOKOnly + vbExclamation, "信息提示"
mrc.Close
Unload Me
End If
Else
' userlevel = Trim(mrc.Fields("用户名"))
main.Label5.Caption = Text1(1)
str = mrc.Fields("所有权限")
main.Label6.Caption = str
mrc.Close
Unload Me
main.Show
End If
End Sub
Private Sub Command2_Click()
Unload Me
qidong.Show
End Sub
Private Sub Form_Load()
n = 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
If str = "系统管理员" Then
ElseIf main.Label6.Caption = "试卷读写" Then
ElseIf main.Label6.Caption = "试卷只读" Then
End If
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then
Command1_Click
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -