⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmainmdi.frm

📁 一个功能强大、程序条理分明的学生学籍管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.MDIForm frmMainMDI 
   BackColor       =   &H8000000C&
   Caption         =   "学生管理系统"
   ClientHeight    =   7725
   ClientLeft      =   1365
   ClientTop       =   2355
   ClientWidth     =   12600
   LinkTopic       =   "MDIForm1"
   Picture         =   "frmMainMDI.frx":0000
   WindowState     =   2  'Maximized
   Begin MSComctlLib.Toolbar tlbMainMdi 
      Align           =   1  'Align Top
      Height          =   420
      Left            =   0
      TabIndex        =   5
      Top             =   0
      Width           =   12600
      _ExtentX        =   22225
      _ExtentY        =   741
      ButtonWidth     =   609
      ButtonHeight    =   582
      Appearance      =   1
      ImageList       =   "ilsToolBar"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   9
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "水平排列"
            Object.ToolTipText     =   "水平排列"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "垂直排列"
            Object.ToolTipText     =   "垂直排列"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "层叠排列"
            Object.ToolTipText     =   "层叠排列"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "关闭当前窗口"
            Object.ToolTipText     =   "关闭当前窗口"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "关闭所有窗口"
            Object.ToolTipText     =   "关闭所有窗口"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "目录树"
            Object.ToolTipText     =   "目录树"
            ImageIndex      =   6
            Style           =   1
         EndProperty
      EndProperty
      Begin VB.Timer tmrStat 
         Interval        =   1000
         Left            =   7560
         Top             =   0
      End
      Begin MSComctlLib.ImageList ilsToolBar 
         Left            =   8640
         Top             =   0
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   16
         ImageHeight     =   16
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   6
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmMainMDI.frx":5814
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmMainMDI.frx":5D66
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmMainMDI.frx":6288
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmMainMDI.frx":67DA
               Key             =   ""
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmMainMDI.frx":68EC
               Key             =   ""
            EndProperty
            BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmMainMDI.frx":6E3E
               Key             =   ""
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.ImageList ilsTreeView 
         Left            =   9960
         Top             =   0
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   16
         ImageHeight     =   15
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   3
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmMainMDI.frx":7390
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmMainMDI.frx":77E2
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmMainMDI.frx":7C34
               Key             =   ""
            EndProperty
         EndProperty
      End
   End
   Begin MSComctlLib.StatusBar staMainMdi 
      Align           =   2  'Align Bottom
      Height          =   405
      Left            =   0
      TabIndex        =   4
      Top             =   7320
      Width           =   12600
      _ExtentX        =   22225
      _ExtentY        =   714
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   4
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            Object.Width           =   4057
            MinWidth        =   4057
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            AutoSize        =   1
            Object.Width           =   12515
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            Alignment       =   2
            AutoSize        =   2
            TextSave        =   "2002-11-28"
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            Alignment       =   2
            AutoSize        =   2
            TextSave        =   "9:19"
         EndProperty
      EndProperty
   End
   Begin VB.PictureBox picTreeView 
      Align           =   3  'Align Left
      Height          =   6900
      Left            =   0
      ScaleHeight     =   6840
      ScaleWidth      =   2280
      TabIndex        =   0
      Top             =   420
      Width           =   2340
      Begin MSComctlLib.TreeView treMenu 
         Height          =   6615
         Left            =   0
         TabIndex        =   3
         Top             =   240
         Width           =   2295
         _ExtentX        =   4048
         _ExtentY        =   11668
         _Version        =   393217
         Style           =   7
         Appearance      =   1
      End
      Begin VB.CommandButton cmdCancelTree 
         Appearance      =   0  'Flat
         Caption         =   "X"
         Height          =   255
         Left            =   2040
         Style           =   1  'Graphical
         TabIndex        =   1
         Top             =   0
         Width           =   255
      End
      Begin VB.Label lblTreeView 
         Caption         =   " 操作选项:"
         Height          =   255
         Left            =   0
         TabIndex        =   2
         Top             =   0
         Width           =   1455
      End
   End
   Begin VB.Menu mnuInfo 
      Caption         =   "【学生信息管理(&M)】"
      Begin VB.Menu mnuInfoManage 
         Caption         =   "学生录入"
      End
      Begin VB.Menu mnuInfoQuery 
         Caption         =   "学生查询"
      End
      Begin VB.Menu mnuInfoSeperator 
         Caption         =   "-"
      End
      Begin VB.Menu mnuInfoExit 
         Caption         =   "退出(&X)"
      End
   End
   Begin VB.Menu mnuScore 
      Caption         =   "【成绩管理(&S)】"
      Begin VB.Menu mnuScoreInput 
         Caption         =   "成绩录入"
      End
      Begin VB.Menu mnuScoreQuery 
         Caption         =   "成绩查询"
      End
   End
   Begin VB.Menu mnuUser 
      Caption         =   "【用户管理(&U)】"
      Begin VB.Menu mnuUserPsw 
         Caption         =   "密码修改"
      End
      Begin VB.Menu mnuUserManage 
         Caption         =   "用户维护"
      End
   End
   Begin VB.Menu mnuWindow 
      Caption         =   "【窗口(&W)】"
      WindowList      =   -1  'True
      Begin VB.Menu mnuWindowHorizontal 
         Caption         =   "水平平铺"
      End
      Begin VB.Menu mnuWindowVertical 
         Caption         =   "垂直平铺"
      End
      Begin VB.Menu mnuWindowCascade 
         Caption         =   "层叠窗口"
      End
      Begin VB.Menu mnuWindowIcon 
         Caption         =   "排列图标"
      End
      Begin VB.Menu mnuWindowSeperator 
         Caption         =   "-"
      End
      Begin VB.Menu mnuWindowShowTree 
         Caption         =   "显示操作树"
      End
      Begin VB.Menu mnuWindowCloseTree 
         Caption         =   "关闭操作树"
      End
      Begin VB.Menu mnuWindowSeperatorTree 
         Caption         =   "-"
      End
      Begin VB.Menu mnuWindowClose 
         Caption         =   "关闭当前窗口"
      End
      Begin VB.Menu mnuWindowCloseAll 
         Caption         =   "关闭全部窗口"
      End
   End
   Begin VB.Menu mnuHelp 
      Caption         =   "【帮助(&H)】"
      Begin VB.Menu mnuHelpHelp 
         Caption         =   "帮助"
      End
      Begin VB.Menu mnuHelpAbout 
         Caption         =   "关于"
      End
   End
End
Attribute VB_Name = "frmMainMDI"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private mintChildWinCount As Integer '记录子窗体个数
'字符串常量,分别代表应用程序中用到的四个功能菜单的标题文本
Const strInfoQuery = "学生查询"
Const strInfoManage = "学生录入"
Const strScoreInput = "成绩录入"
Const strScoreFind = "成绩查询"

'定义三个集合对象,分别用来存放“学生信息管理”
'“成绩管理”中的子菜单标题字符串
'以及上述两个菜单中所有子菜单的标题字符串
Public colInfo As Collection
Public colScore As Collection
Public colAllMenu As Collection

'初始化存放学生信息子菜单的集合
Public Sub Info_Initialize()
    Set colInfo = New Collection
    colInfo.Add strInfoManage
    colInfo.Add strInfoQuery
End Sub

'初始化存放学生成绩子菜单的集合
Public Sub Score_Initialize()
    Set colScore = New Collection
    colScore.Add strScoreInput
    colScore.Add strScoreFind
End Sub

'初始化存放所有子菜单的集合
Public Sub AllMenu_initialize()
    Set colAllMenu = New Collection
    colAllMenu.Add strInfoManage
    colAllMenu.Add strInfoQuery
    colAllMenu.Add strScoreInput
    colAllMenu.Add strScoreFind
End Sub

'设定目录树与菜单对应的操作
'这个地方利用了索引来查找目录树中与菜单中对应的操作
'因为已经将所有子菜单项目按顺序的加入了AllMenu集合中
'因此,直接通过对该集合索引的查询就等于查找了对应的
'子菜单,因此可以准确的执行相应的操作功能
Public Sub MenuOperate(ByVal iIndex As Integer)
    Select Case iIndex
        Case 1
            Call mnuInfoManage_Click
        Case 2
            Call mnuInfoQuery_Click
        Case 3
            Call mnuScoreInput_Click
        Case 4
            Call mnuScoreQuery_Click
        Case Else
            Exit Sub
    End Select
End Sub

'自己定义了一个MDI窗体的只读公有属性,该属性用来存放
'在MDI应用程序中打开的子窗口的数量
Public Property Get ChildWindowCount() As Integer
    ChildWindowCount = mintChildWinCount
End Property

'根据子窗体的个数来设置菜单是否被禁用
'在每个子窗体的Load部分都将要执行该代码
'每次执行该代码,都将MDI窗体的属性ChildWindowCount增加1
'根据ChildWindowCount属性来判断是否激活“关闭当前窗体”和“关闭所有窗体”
'的菜单项
Public Sub WindowCreated()
    mintChildWinCount = mintChildWinCount + 1
    If mintChildWinCount > 0 Then
        mnuWindowClose.Enabled = True
        mnuWindowCloseAll.Enabled = True
    End If
End Sub

'根据子窗体的个数来设置菜单是否被禁用
'在每个子窗体的UnLoad部分都将要执行该代码
'每次执行该代码,都将MDI窗体的属性ChildWindowCount减少1
'根据ChildWindowCount属性来判断是否激活“关闭当前窗体”和“关闭所有窗体”
'的菜单项
Public Sub WindowDestroyed()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -