www.pudn.com > textmanager.rar > FrmMainb.frm, change:2005-04-12,size:7396b


VERSION 5.00 
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX" 
Begin VB.MDIForm FrmMain  
   BackColor       =   &H8000000C& 
   Caption         =   "题库与考试管理系统--服务器端" 
   ClientHeight    =   5730 
   ClientLeft      =   1650 
   ClientTop       =   1815 
   ClientWidth     =   6390 
   LinkTopic       =   "MDIForm1" 
   WindowState     =   2  'Maximized 
   Begin VB.PictureBox Picture1  
      Align           =   3  'Align Left 
      Appearance      =   0  'Flat 
      BackColor       =   &H00C0E0FF& 
      BorderStyle     =   0  'None 
      ForeColor       =   &H80000008& 
      Height          =   5730 
      Left            =   0 
      ScaleHeight     =   5730 
      ScaleWidth      =   11880 
      TabIndex        =   0 
      Top             =   0 
      Width           =   11880 
      Begin VB.Image Image1  
         Height          =   1110 
         Left            =   0 
         Picture         =   "FrmMainb.frx":0000 
         Stretch         =   -1  'True 
         Top             =   15 
         Width           =   11835 
      End 
      Begin VB.Shape Shape1  
         BackStyle       =   1  'Opaque 
         Height          =   7170 
         Left            =   5130 
         Top             =   1140 
         Width           =   6810 
      End 
   End 
   Begin MSComctlLib.ImageList ImageList1  
      Left            =   2040 
      Top             =   3600 
      _ExtentX        =   1005 
      _ExtentY        =   1005 
      BackColor       =   -2147483643 
      ImageWidth      =   16 
      ImageHeight     =   16 
      MaskColor       =   12632256 
      _Version        =   393216 
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}  
         NumListImages   =   3 
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "FrmMainb.frx":28F02 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "FrmMainb.frx":2905C 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "FrmMainb.frx":29376 
            Key             =   "" 
         EndProperty 
      EndProperty 
   End 
   Begin VB.Menu Active  
      Caption         =   "系统操作(&A)" 
      Begin VB.Menu InsertTM  
         Caption         =   "题库录入/修改(&I)" 
      End 
      Begin VB.Menu CreateSJ  
         Caption         =   "试卷生成/修改(&C)" 
      End 
      Begin VB.Menu SetKS  
         Caption         =   "考试设置(&S)" 
      End 
      Begin VB.Menu InsertXS  
         Caption         =   "学生信息录入(&X)" 
      End 
      Begin VB.Menu q  
         Caption         =   "-" 
      End 
      Begin VB.Menu Exit  
         Caption         =   "退出(&Q)" 
      End 
   End 
   Begin VB.Menu Query  
      Caption         =   "系统查询(&E)" 
      Begin VB.Menu QueryTM  
         Caption         =   "题目查询(&T)" 
      End 
      Begin VB.Menu QuerySJ  
         Caption         =   "试卷查询(&S)" 
      End 
      Begin VB.Menu QueryXS  
         Caption         =   "学生成绩查询(&X)" 
      End 
   End 
   Begin VB.Menu SysStart  
      Caption         =   "系统初始化(&S)" 
      Begin VB.Menu DBStart  
         Caption         =   "系统数据库初始化(&S)" 
      End 
      Begin VB.Menu qqqq  
         Caption         =   "-" 
      End 
      Begin VB.Menu WeiHuDW  
         Caption         =   "单位信息设置(&D)" 
      End 
   End 
   Begin VB.Menu WeiHu  
      Caption         =   "数据维护(&W)" 
      Begin VB.Menu WeiHuKM  
         Caption         =   "科目信息维护(&K)" 
      End 
      Begin VB.Menu WeiHuNJ  
         Caption         =   "年级信息维护(&G)" 
      End 
      Begin VB.Menu q1  
         Caption         =   "-" 
      End 
      Begin VB.Menu WeiHuCZ  
         Caption         =   "操作员维护(&C)" 
      End 
      Begin VB.Menu WeiHuMM  
         Caption         =   "修改密码(&M)" 
      End 
      Begin VB.Menu q5  
         Caption         =   "-" 
      End 
      Begin VB.Menu WeiHuJK  
         Caption         =   "局况信息维护(&J)" 
      End 
      Begin VB.Menu q2  
         Caption         =   "-" 
      End 
      Begin VB.Menu WeiHuBH  
         Caption         =   "数据备份/恢复(&B)" 
      End 
   End 
   Begin VB.Menu Help  
      Caption         =   "帮助(&H)" 
      Begin VB.Menu SystemHelp  
         Caption         =   "系统帮助(&H)" 
      End 
      Begin VB.Menu qqq  
         Caption         =   "-" 
      End 
      Begin VB.Menu About  
         Caption         =   "关于(&A)" 
      End 
   End 
End 
Attribute VB_Name = "FrmMain" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
 
Private Sub CreateSJ_Click() 
  UseForm = "FrmShiJuan" 
  FrmSet.Show 1 
 
End Sub 
'设置菜单操作权限 
Public Sub SetMeun() 
  '保存取得操作员的权限 
  Dim QuanXian As String 
  Dim adoRS As Recordset 
  Set adoRS = New Recordset 
  adoRS.Open "select quanxian from admin where code='" + UserCode + "'", DB, adOpenStatic, adLockOptimistic 
  '取得各个权限的数组 
  QuanXian = adoRS.Fields(0).Value 
  Set adoRS = Nothing 
  Dim QX() As String 
  QX = Split(QuanXian, ",") 
  '设置各个菜单的可用性 
 ' 题目录入/修改 
  '试卷生成/修改 
 '考试设置 
'考生信息录入 
'查询 
'总类信息维护 
'子类信息维护 
'操作员信息维护 
'单位信息维护 
'局况信息维护 
'数据备份/恢复 
   InsertTM.Enabled = YN2TF(QX(0)) 
   CreateSJ.Enabled = YN2TF(QX(1)) 
   SetKS.Enabled = YN2TF(QX(2)) 
   InsertXS.Enabled = YN2TF(QX(3)) 
   Query.Enabled = YN2TF(QX(4)) 
   WeiHuKM.Enabled = YN2TF(QX(5)) 
   WeiHuNJ.Enabled = YN2TF(QX(6)) 
   WeiHuCZ.Enabled = YN2TF(QX(7)) 
   WeiHuDW.Enabled = YN2TF(QX(8)) 
   WeiHuJK.Enabled = YN2TF(QX(9)) 
   WeiHuBH.Enabled = YN2TF(QX(10)) 
End Sub 
'N转化成false,Y转化成true的函数 
Function YN2TF(ByVal YN As String) As Boolean 
   If YN = "Y" Then 
     YN2TF = True 
    Else 
     YN2TF = False 
   End If 
End Function 
Private Sub Exit_Click() 
  End 
   
End Sub 
 
 
 
Private Sub InsertTM_Click() 
UseForm = "FrmQuestion" 
FrmSet.Show 1 
End Sub 
 
Private Sub InsertXS_Click() 
  FrmStudent.WindowState = 2 
   
  FrmStudent.Show 1 
End Sub 
 
Private Sub MDIForm_Load() 
  '设置菜单 
  SetMeun 
End Sub 
 
Private Sub MDIForm_Resize() 
  Picture1.Left = 100 
  Picture1.Width = Me.Width - 150 
  Image1.Top = Picture1.Top 
  Image1.Width = Picture1.Width 
End Sub 
 
Private Sub MDIForm_Unload(Cancel As Integer) 
  End 
End Sub 
 
Private Sub Picture1_Click() 
 
End Sub 
 
Private Sub QuerySJ_Click() 
 FrmSeachCJ.Show 1 
End Sub 
 
Private Sub QueryTM_Click() 
 FrmSeach.Show 1 
End Sub 
 
Private Sub SetKS_Click() 
FrmShezhi.Show 1 
End Sub 
 
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) 
  Select Case Button.Index 
    Case 1 
      InsertTM_Click 
  End Select 
   
End Sub 
 
Private Sub WeiHuCZ_Click() 
 FrmAdmin.Show 1 
End Sub 
 
Private Sub WeiHuDW_Click() 
  FrmDanWei.Show 1 
End Sub 
 
Private Sub WeiHuJK_Click() 
  Frm单位.Show 1 
End Sub 
 
Private Sub WeiHuKM_Click() 
  FrmKeMu.Show 1 
End Sub 
 
Private Sub WeiHuMM_Click() 
 FrmMiMa.Show 1 
End Sub 
 
Private Sub WeiHuNJ_Click() 
 FrmNianJi.Show 1 
End Sub