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

📄 frmmain.frm

📁 这是一个用vb写的学生管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.MDIForm frmMain 
   BackColor       =   &H00FFFFFF&
   Caption         =   "学生信息管理系统"
   ClientHeight    =   8430
   ClientLeft      =   60
   ClientTop       =   750
   ClientWidth     =   10065
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "MDIForm1"
   Picture         =   "frmMain.frx":030A
   StartUpPosition =   2  '屏幕中心
   WindowState     =   2  'Maximized
   Begin MSComctlLib.StatusBar stbMain 
      Align           =   2  'Align Bottom
      Height          =   360
      Left            =   0
      TabIndex        =   1
      Top             =   8070
      Width           =   10065
      _ExtentX        =   17754
      _ExtentY        =   635
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   5
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   6068
            MinWidth        =   6068
            Picture         =   "frmMain.frx":8FA3
            Text            =   "学生信息管理系统"
            TextSave        =   "学生信息管理系统"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   4304
            MinWidth        =   4304
            Text            =   "作者:求是科技"
            TextSave        =   "作者:求是科技"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   2
            AutoSize        =   1
            Object.Width           =   4304
            MinWidth        =   4304
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            Alignment       =   2
            Object.Width           =   2716
            MinWidth        =   2716
            TextSave        =   "2005-1-8"
         EndProperty
         BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            Alignment       =   2
            Object.Width           =   2716
            MinWidth        =   2716
            TextSave        =   "22:21"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   1200
      Top             =   2760
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   4
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":92BD
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":95D7
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":98F1
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":9C0B
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar tlbMain 
      Align           =   1  'Align Top
      Height          =   855
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   10065
      _ExtentX        =   17754
      _ExtentY        =   1508
      ButtonWidth     =   1455
      ButtonHeight    =   1349
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   7
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "信息管理"
            Key             =   "Student"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "信息查询"
            Key             =   "Find"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "重新登录"
            Key             =   "Login"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出系统"
            Key             =   "Exit"
            ImageIndex      =   4
         EndProperty
      EndProperty
   End
   Begin VB.Menu mnuGeneral 
      Caption         =   "通用(&G)   "
      Begin VB.Menu mnuStudent 
         Caption         =   "信息管理"
         Shortcut        =   {F5}
      End
      Begin VB.Menu mnuFind 
         Caption         =   "信息查询"
         Shortcut        =   {F6}
      End
   End
   Begin VB.Menu mnuWindows 
      Caption         =   "窗口(&W)   "
      Begin VB.Menu mnuHori 
         Caption         =   "水平平铺"
         Shortcut        =   ^H
      End
      Begin VB.Menu mnuVer 
         Caption         =   "垂直平铺"
         Shortcut        =   ^V
      End
      Begin VB.Menu mnuTemp1 
         Caption         =   "-"
      End
      Begin VB.Menu mnuCas 
         Caption         =   "层叠"
         Shortcut        =   ^C
      End
      Begin VB.Menu mnuArr 
         Caption         =   "排列图标"
         Shortcut        =   ^I
      End
   End
   Begin VB.Menu mnuSystem 
      Caption         =   "系统(&S)   "
      Begin VB.Menu mnuAbout 
         Caption         =   "关于"
         Shortcut        =   ^A
      End
      Begin VB.Menu mnuTemp2 
         Caption         =   "-"
      End
      Begin VB.Menu mnuLog 
         Caption         =   "重新登录"
         Shortcut        =   ^L
      End
      Begin VB.Menu mnuExit 
         Caption         =   "退出系统"
         Shortcut        =   ^X
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'表示当前的用户类型:0---管理员类型的用户; 1---学生类型的用户
Public mnUserType As Integer
'表示当前登录的用户名
Public msUserName As String


Private Sub MDIForm_Load()
    '根据不同的用户类型,使相应的菜单项可见
  Select Case mnUserType
    Case 0:                       '以管理员身份登录
        mnuFind.Visible = True
        tlbMain.Buttons.Item(3).Visible = True
        tlbMain.Buttons.Item(4).Visible = True
        Exit Sub
    Case 1:                       '以学生身份登录, 只能查询自己的信息
        mnuFind.Visible = False   '“信息查询”菜单不可见
        tlbMain.Buttons.Item(3).Visible = False   '“信息查询”按钮不可见
        tlbMain.Buttons.Item(4).Visible = False   '第二个分隔条不可见
        Exit Sub
  End Select
End Sub

Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  If MsgBox("真的要对出本系统吗?", vbQuestion + vbYesNo + vbDefaultButton2, "退出") = vbNo Then
    Cancel = 1
  End If
End Sub
Private Sub mnuAbout_Click()
    Load frmSplash
    frmSplash.mbAbout = True
    frmSplash.Show vbModal
End Sub

Private Sub mnuArr_Click()
    frmMain.Arrange (3)    '设置主窗体中所有最小化MDI子窗体图标重排
End Sub

Private Sub mnuCas_Click()
    frmMain.Arrange (0)    '设置主窗体中所有非最小化MDI子窗体层叠显示
End Sub

Private Sub mnuExit_Click()
    Unload Me
End Sub

Private Sub mnuFind_Click()
   frmFind.Show
End Sub



Private Sub mnuHori_Click()
    frmMain.Arrange (1)    '设置主窗体中所有非最小化MDI子窗体水平平铺
End Sub

Private Sub mnuLog_Click()
    If MsgBox("若重新登录,所有窗体都将关闭!" & vbCrLf & "    是否重新登录?", _
                vbQuestion + vbYesNo + vbDefaultButton2, "重新登录") = vbYes Then
        Unload Me
        frmLogin.Show
    End If
End Sub

Private Sub mnuStudent_Click()
        Load frmStudent
        frmStudent.Show
End Sub
Private Sub mnuVer_Click()
    frmMain.Arrange (2)    '设置主窗体中所有非最小化MDI子窗体垂直平铺
End Sub


Private Sub tlbMain_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Key
        Case "Student"
              mnuStudent_Click
              Exit Sub
        Case "Find"
          mnuFind_Click
          Exit Sub
        Case "Login"
          mnuLog_Click
          Exit Sub
        Case "Exit"
          mnuExit_Click
          Exit Sub
    End Select
End Sub

⌨️ 快捷键说明

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