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

📄 frm_menu.frm

📁 学生信息的管理是学校经常遇到的问题。学生数量的积聚增加和学生认识制度的改革
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Height          =   990
         Index           =   13
         Left            =   1005
         TabIndex        =   35
         Top             =   6885
         Visible         =   0   'False
         Width           =   1170
         Begin VB.Label Labelchild 
            BackStyle       =   0  'Transparent
            Caption         =   " 退出系统"
            ForeColor       =   &H8000000E&
            Height          =   195
            Index           =   13
            Left            =   30
            TabIndex        =   36
            Top             =   795
            Width           =   1110
         End
         Begin VB.Image Image1 
            Appearance      =   0  'Flat
            Height          =   480
            Index           =   13
            Left            =   240
            Picture         =   "frm_menu.frx":31C0
            Top             =   135
            Width           =   480
         End
      End
      Begin VB.Frame bottonchild 
         BackColor       =   &H00FF8080&
         BorderStyle     =   0  'None
         Caption         =   "Frame2"
         Height          =   990
         Index           =   10
         Left            =   -75
         TabIndex        =   31
         Top             =   6555
         Visible         =   0   'False
         Width           =   1170
         Begin VB.Image Image1 
            Appearance      =   0  'Flat
            Height          =   480
            Index           =   10
            Left            =   240
            Picture         =   "frm_menu.frx":34CA
            Top             =   135
            Width           =   480
         End
         Begin VB.Label Labelchild 
            BackStyle       =   0  'Transparent
            Caption         =   "学生考试名单"
            ForeColor       =   &H8000000E&
            Height          =   195
            Index           =   10
            Left            =   30
            TabIndex        =   32
            Top             =   780
            Width           =   1110
         End
      End
      Begin VB.Frame bottonchild 
         BackColor       =   &H00FF8080&
         BorderStyle     =   0  'None
         Caption         =   "Frame2"
         Height          =   990
         Index           =   11
         Left            =   765
         TabIndex        =   37
         Top             =   7335
         Visible         =   0   'False
         Width           =   1170
         Begin VB.Label Labelchild 
            BackStyle       =   0  'Transparent
            Caption         =   "学员成绩名单"
            ForeColor       =   &H8000000E&
            Height          =   195
            Index           =   11
            Left            =   15
            TabIndex        =   38
            Top             =   765
            Width           =   1110
         End
         Begin VB.Image Image1 
            Appearance      =   0  'Flat
            Height          =   480
            Index           =   11
            Left            =   255
            Picture         =   "frm_menu.frx":3A4C
            Top             =   135
            Width           =   480
         End
      End
      Begin VB.Frame bottonchild 
         BackColor       =   &H00FF8080&
         BorderStyle     =   0  'None
         Caption         =   "Frame2"
         Height          =   990
         Index           =   9
         Left            =   1065
         TabIndex        =   29
         Top             =   5490
         Visible         =   0   'False
         Width           =   1170
         Begin VB.Image Image1 
            Appearance      =   0  'Flat
            Height          =   480
            Index           =   9
            Left            =   240
            Picture         =   "frm_menu.frx":3FCE
            Top             =   135
            Width           =   480
         End
         Begin VB.Label Labelchild 
            BackStyle       =   0  'Transparent
            Caption         =   "学生信息名单"
            ForeColor       =   &H8000000E&
            Height          =   195
            Index           =   9
            Left            =   30
            TabIndex        =   30
            Top             =   795
            Width           =   1110
         End
      End
      Begin VB.Frame bottonchild 
         BackColor       =   &H00FF8080&
         BorderStyle     =   0  'None
         Caption         =   "Frame2"
         Height          =   990
         Index           =   12
         Left            =   1065
         TabIndex        =   33
         Top             =   6420
         Visible         =   0   'False
         Width           =   1065
         Begin VB.Label Labelchild 
            BackStyle       =   0  'Transparent
            Caption         =   "系统参数设置"
            ForeColor       =   &H8000000E&
            Height          =   195
            Index           =   12
            Left            =   15
            TabIndex        =   34
            Top             =   780
            Width           =   1110
         End
         Begin VB.Image Image1 
            Appearance      =   0  'Flat
            Height          =   480
            Index           =   12
            Left            =   255
            Picture         =   "frm_menu.frx":4550
            Top             =   150
            Width           =   480
         End
      End
      Begin VB.Frame bottonchild 
         BackColor       =   &H00FF8080&
         BorderStyle     =   0  'None
         Caption         =   "Frame2"
         Height          =   990
         Index           =   8
         Left            =   -60
         TabIndex        =   27
         Top             =   5610
         Visible         =   0   'False
         Width           =   1170
         Begin VB.Image Image1 
            Appearance      =   0  'Flat
            Height          =   480
            Index           =   8
            Left            =   255
            Picture         =   "frm_menu.frx":485A
            Top             =   135
            Width           =   480
         End
         Begin VB.Label Labelchild 
            BackStyle       =   0  'Transparent
            Caption         =   "升学率图示"
            ForeColor       =   &H8000000E&
            Height          =   195
            Index           =   8
            Left            =   30
            TabIndex        =   28
            Top             =   780
            Width           =   1110
         End
      End
   End
End
Attribute VB_Name = "frm_menu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim MOVESTATE As Integer   '标记移动窗体时按钮botton是否处于选中状态

Private Sub bottonchild_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1(Index).BorderStyle = 0
End Sub

Private Sub Form_Load()
Dim i As Integer
MOVESTATE = 0
Me.Top = 0
Me.Left = 0
Me.Height = Screen.Height
Frame1.Height = Me.Height - 10
Frame1.Top = 10
Frame1.Left = 10
Frame1.Width = botton1(0).Width + 30
For i = 0 To 4
botton1(i).Left = Frame1.Left
Next
Botton_State 0  '初始状态
End Sub

Private Sub Form_Resize()
'窗体移动时frame1以及各按钮位置跟着调整
Me.Top = 0
Me.Left = 0
If Me.Height > 1460 Then Me.Height = frm_main.Height - 1460
If Me.Height > 420 Then Frame1.Height = Me.Height - 10
Select Case MOVESTATE
Case 0
     Botton_State 0
Case 1
     Botton_State 1
Case 2
     Botton_State 2
Case 3
     Botton_State 3
Case 4
     Botton_State 4
End Select
Me.Refresh
End Sub



Private Sub Image1_Click(Index As Integer)
Select Case Index
Case 0
     frm_addnewstudent.Show
Case 1
     frm_setfee.Show
Case 2
     frm_setcourse.Show
Case 3
     frm_setclass.Show
Case 4
     frm_enterforexam.Show
Case 5
     frm_addmark.Show
Case 6
     frm_statmark.Show
Case 7
     frm_setstatus.Show
Case 8
     frm_risepicture.Show
Case 9
     frm_studentreport.Show 1
Case 10
     frm_examreport.Show 1
Case 11
     frm_markreport.Show 1
Case 12
     frm_setsystem.Show
Case 13
     End
End Select
End Sub

Private Sub Image1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1(Index).BorderStyle = 1
End Sub

Private Sub Label1_Click(Index As Integer)
'设置各大按钮的位置
Select Case Index
Case 0
    Botton_State 0
    MOVESTATE = 0
Case 1
    Botton_State 1
    MOVESTATE = 1
Case 2
    Botton_State 2
    MOVESTATE = 2
Case 3
    Botton_State 3
    MOVESTATE = 3
Case 4
    Botton_State 4
    MOVESTATE = 4
End Select
End Sub



Public Sub Botton_State(flag As Integer)
'初始状态
Select Case flag
Case 0
    botton1(0).Top = Frame1.Top
    botton1(1).Top = Frame1.Height - 4 * botton1(0).Height - 60
    botton1(2).Top = Frame1.Height - 3 * botton1(0).Height - 50
    botton1(3).Top = Frame1.Height - 2 * botton1(0).Height - 30
    botton1(4).Top = Frame1.Height - 1 * botton1(0).Height - 20
    BottonChild_State 0
Case 1
    botton1(0).Top = Frame1.Top
    botton1(1).Top = Frame1.Top + botton1(1).Height + 20
    botton1(2).Top = Frame1.Height - 3 * botton1(0).Height - 50
    botton1(3).Top = Frame1.Height - 2 * botton1(0).Height - 30
    botton1(4).Top = Frame1.Height - 1 * botton1(0).Height - 20
    BottonChild_State 1
Case 2
    botton1(0).Top = Frame1.Top
    botton1(1).Top = Frame1.Top + botton1(1).Height + 20
    botton1(2).Top = Frame1.Top + 2 * botton1(1).Height + 30
    botton1(3).Top = Frame1.Height - 2 * botton1(0).Height - 30
    botton1(4).Top = Frame1.Height - 1 * botton1(0).Height - 20
    BottonChild_State 2
Case 3
    botton1(0).Top = Frame1.Top
    botton1(1).Top = botton1(0).Height + 30
    botton1(2).Top = 2 * botton1(0).Height + 40
    botton1(3).Top = 3 * botton1(0).Height + 60
    botton1(4).Top = Frame1.Height - 1 * botton1(0).Height - 20
    BottonChild_State 3
Case 4
    botton1(0).Top = Frame1.Top
    botton1(1).Top = botton1(0).Height + 30
    botton1(2).Top = 2 * botton1(0).Height + 40
    botton1(3).Top = 3 * botton1(0).Height + 60
    botton1(4).Top = 4 * botton1(0).Height + 70
    BottonChild_State 4
End Select
End Sub

Public Sub BottonChild_State(who As Integer)
'设置各个子按钮的位置
Dim i As Integer
Select Case who
Case 0
    For i = 0 To 3
        bottonchild(i).Visible = True
    Next
    For i = 4 To 13
        bottonchild(i).Visible = False
    Next
    For i = 0 To 3
        bottonchild(i).Left = (Frame1.Width - bottonchild(0).Width) / 2
    Next
        bottonchild(0).Top = botton1(0).Height + 30
        bottonchild(1).Top = botton1(0).Height + 30 + bottonchild(0).Height
        bottonchild(2).Top = botton1(0).Height + 30 + 2 * bottonchild(0).Height
        bottonchild(3).Top = botton1(0).Height + 30 + 3 * bottonchild(0).Height
        
Case 1
    For i = 0 To 3
        bottonchild(i).Visible = False
    Next
    For i = 7 To 13
        bottonchild(i).Visible = False
    Next
    For i = 4 To 6
        bottonchild(i).Visible = True
    Next
    For i = 4 To 6
        bottonchild(i).Left = (Frame1.Width - bottonchild(0).Width) / 2
    Next
        bottonchild(4).Top = 2 * botton1(0).Height + 30
        bottonchild(5).Top = 2 * botton1(0).Height + 30 + bottonchild(0).Height
        bottonchild(6).Top = 2 * botton1(0).Height + 30 + 2 * bottonchild(0).Height

Case 2
    For i = 0 To 6
        bottonchild(i).Visible = False
    Next
    For i = 9 To 13
        bottonchild(i).Visible = False
    Next
    For i = 7 To 8
        bottonchild(i).Visible = True
    Next
    For i = 7 To 8
        bottonchild(i).Left = (Frame1.Width - bottonchild(0).Width) / 2
    Next
        bottonchild(7).Top = 3 * botton1(0).Height + 30
        bottonchild(8).Top = 3 * botton1(0).Height + 30 + bottonchild(0).Height
Case 3
    For i = 0 To 8
        bottonchild(i).Visible = False
    Next
    For i = 12 To 13
        bottonchild(i).Visible = False
    Next
    For i = 9 To 11
        bottonchild(i).Visible = True
    Next
    For i = 9 To 11
        bottonchild(i).Left = (Frame1.Width - bottonchild(0).Width) / 2
    Next
        bottonchild(9).Top = 4 * botton1(0).Height + 30
        bottonchild(10).Top = 4 * botton1(0).Height + 30 + bottonchild(0).Height
        bottonchild(11).Top = 4 * botton1(0).Height + 30 + 2 * bottonchild(0).Height
Case 4
    For i = 0 To 11
        bottonchild(i).Visible = False
    Next
    For i = 12 To 13
        bottonchild(i).Visible = True
    Next
    For i = 12 To 13
        bottonchild(i).Left = (Frame1.Width - bottonchild(0).Width) / 2
    Next
        bottonchild(12).Top = 5 * botton1(0).Height + 30
        bottonchild(13).Top = 5 * botton1(0).Height + 30 + bottonchild(0).Height
        
End Select
End Sub

⌨️ 快捷键说明

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