📄 mdifrmmain.frm
字号:
VERSION 5.00
Begin VB.MDIForm MDIfrmMain
BackColor = &H8000000C&
Caption = "高校考试管理信息系统"
ClientHeight = 5325
ClientLeft = 165
ClientTop = 435
ClientWidth = 8280
LinkTopic = "MDIForm1"
StartUpPosition = 2 '屏幕中心
WindowState = 2 'Maximized
Begin VB.Menu mTest
Caption = "人员"
Begin VB.Menu mtLogin
Caption = "人员登录"
End
Begin VB.Menu mtLogout
Caption = "注销登录"
Enabled = 0 'False
End
Begin VB.Menu mtBar
Caption = "-"
End
Begin VB.Menu mtExit
Caption = "退出系统"
End
End
Begin VB.Menu mStudent
Caption = "学生"
Visible = 0 'False
Begin VB.Menu msBeginTest
Caption = "开始测试"
End
Begin VB.Menu msQuery
Caption = "信息查询"
End
End
Begin VB.Menu mTeacher
Caption = "教师"
Visible = 0 'False
Begin VB.Menu mcPaper
Caption = "生成试卷"
End
Begin VB.Menu mcLookThrough
Caption = "浏览试卷"
End
Begin VB.Menu mcModify
Caption = "修改考卷"
End
Begin VB.Menu mcBar1
Caption = "-"
End
Begin VB.Menu mcRefresh
Caption = "试题管理"
End
Begin VB.Menu mcBar2
Caption = "-"
End
Begin VB.Menu mcCheck
Caption = "评判试卷"
End
Begin VB.Menu mcQuery
Caption = "查询结果"
End
End
Begin VB.Menu MAdmin
Caption = "管理员"
Visible = 0 'False
Begin VB.Menu MAMng
Caption = "信息管理"
End
End
Begin VB.Menu mHelp
Caption = "帮助"
Begin VB.Menu mhReadme
Caption = "使用手册"
End
Begin VB.Menu mhAbout
Caption = "关于"
End
End
End
Attribute VB_Name = "MDIfrmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub MAMng_Click()
frmAdmin.Show vbModal
End Sub
Private Sub mcCheck_Click() '单击评判试卷菜单
If QPaper.Answered Then '如果试卷已经回答,则弹出frmCheck窗体
frmCheck.Show vbModal
Else
MsgBox "考试尚未进行", vbCritical, "操作失败"
End If
End Sub
Private Sub mcLookThrough_Click() '单击浏览试卷菜单
If QPaper.Created Then
QPaper.ReportToFile "varFile.tmp" '将试卷输出到文件
frmReport.FileName = "varFile.tmp" '将文件在frmReport窗体中显示
frmReport.Show vbModal
Kill "varFile.tmp"
Else
MsgBox "试卷还未创建", vbCritical, "错误"
End If
End Sub
Private Sub mcModify_Click() '单击修改试卷菜单
If Not QPaper.Created Then
MsgBox "试卷还没有创建", vbCritical, "错误"
Exit Sub
End If
frmModifyPaper.Show vbModal '弹出窗体frmModifyPaper
End Sub
Private Sub mcPaper_Click() '单击生成试卷菜单
If QPaper.Created Then
MsgBox "试卷已经创建,请选择修改试卷", vbExclamation, "警告"
Exit Sub
End If
frmCreatePaper.Left = Me.Width / 2 - frmCreatePaper.Width / 2
frmCreatePaper.Top = Me.Height / 2 - frmCreatePaper.Height / 2
frmCreatePaper.Show '显示frmCreatePaper窗体
End Sub
Private Sub mcQuery_Click() '单击信息查询菜单
If Not QPaper.Checked Then
MsgBox "试卷还未评阅", vbCritical, "操作失败"
Else
frmResult.Show vbModal '显示frmResult窗体
End If
End Sub
Private Sub mcRefresh_Click() '单击题库管理菜单
frmTestLib.Show vbModal '显示frmTestLib窗体
End Sub
Private Sub mhAbout_Click() '单击关于菜单
frmSplash.Left = Me.Width / 2 - frmSplash.Width / 2
frmSplash.Top = Me.Height / 2 - frmSplash.Height / 2
frmSplash.Show vbModal '显示frmSplash
End Sub
Private Sub mhReadme_Click() '单击帮助手册菜单
frmReport.CmdPrint.Visible = False '显示frmReport窗体
frmReport.FileName = "Readme.txt"
frmReport.Show vbModal
End Sub
Private Sub msBeginTest_Click() '单击开始测试菜单
If Not QPaper.Created Then '如果试卷已经创建,则显示frmAnswer窗体
MsgBox "试卷还没有创建", vbExclamation, "操作无法完成"
Exit Sub
End If
If QPaper.Answered Then
MsgBox "试卷已经提交,请选择查询成绩", vbExclamation, "操作无法完成"
Exit Sub
End If
frmAnswer.Show
End Sub
Private Sub msQuery_Click() '单击查询结果菜单
If Not QPaper.Checked Then
MsgBox "试卷还未评阅", vbCritical, "操作失败"
Else
frmResult.Show vbModal '显示frmResult窗体
End If
End Sub
Private Sub mtExit_Click() '单击退出菜单
End
End Sub
Private Sub mtLogin_Click() '单击用户登录菜单
frmLogin.Show 1 '显示frmLogin登录窗体
If Not TestUser.LogFail Then
Me.Caption = "考试系统"
Me.mtLogin.Enabled = False
Me.mtLogout.Enabled = True
If TestUser.UserType = student Then '根据用户类型显示不同的菜单
Me.mStudent.Visible = True
ElseIf TestUser.UserType = teacher Then
Me.mTeacher.Visible = True
ElseIf TestUser.UserType = administrator Then
Me.MAdmin.Visible = True
End If
End If
End Sub
Private Sub mtLogout_Click() '单击注销登录菜单
Me.mtLogin.Enabled = True
Me.mtLogout.Enabled = False
Me.mStudent.Visible = False
Me.mTeacher.Visible = False
TestUser.LogFail = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -