?? frmmain.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 + -