📄 mainmdiform.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.MDIForm frmMain
BackColor = &H8000000C&
Caption = "矿山企业考评系统"
ClientHeight = 3480
ClientLeft = 60
ClientTop = 630
ClientWidth = 8505
Icon = "MainMDIForm.frx":0000
LinkTopic = "MDIForm1"
StartUpPosition = 2 '屏幕中心
WindowState = 2 'Maximized
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 420
Left = 0
TabIndex = 1
Top = 0
Width = 8505
_ExtentX = 15002
_ExtentY = 741
ButtonWidth = 609
ButtonHeight = 582
AllowCustomize = 0 'False
Appearance = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 6
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "kpNew"
Object.ToolTipText = "新建考评"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "kpOpen"
Object.ToolTipText = "打开考评"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "kpReport"
Object.ToolTipText = "报表输出"
ImageIndex = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "kpRepSaveAs"
Object.ToolTipText = "报表另存为"
ImageIndex = 4
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "kpRepPrint"
Object.ToolTipText = "打印报表"
ImageIndex = 5
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "kpAbout"
Object.ToolTipText = "关于..."
ImageIndex = 6
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList ImageList1
Left = 1800
Top = 1800
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
UseMaskColor = 0 'False
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 6
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMDIForm.frx":0442
Key = "kpNew"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMDIForm.frx":0894
Key = "kpOpenLast"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMDIForm.frx":0BAE
Key = "kpReportOutput"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMDIForm.frx":1000
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMDIForm.frx":1452
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MainMDIForm.frx":76EC
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 0
Top = 3105
Width = 8505
_ExtentX = 15002
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 5
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 4304
MinWidth = 4304
Picture = "MainMDIForm.frx":7B3E
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 1
AutoSize = 2
TextSave = "CAPS"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 2
AutoSize = 2
TextSave = "NUM"
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
AutoSize = 2
TextSave = "2006-10-3"
EndProperty
BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
AutoSize = 2
TextSave = "15:06"
EndProperty
EndProperty
End
Begin VB.Menu mnuEnterpriseKP
Caption = "企业考评(&E)"
Begin VB.Menu mnuNewKP
Caption = "新建考评..."
Shortcut = ^N
End
Begin VB.Menu mnuOpenKP
Caption = "打开考评..."
Shortcut = ^O
End
Begin VB.Menu mnuCloseKP
Caption = "关闭当前考评"
Shortcut = ^X
End
Begin VB.Menu bar11
Caption = "-"
End
Begin VB.Menu mnuReportOutput
Caption = "报表输出..."
Shortcut = ^R
End
Begin VB.Menu mnuRepSaveAs
Caption = "报表另存为..."
Shortcut = ^S
End
Begin VB.Menu mnuRepPrint
Caption = "打印报表"
Shortcut = ^P
End
Begin VB.Menu bar12
Caption = "-"
End
Begin VB.Menu mnuExit
Caption = "退出"
Shortcut = ^Q
End
End
Begin VB.Menu mnuAQGL
Caption = "安全管理(&S)"
Begin VB.Menu mnuaqglUnit
Caption = "安全管理单元"
End
End
Begin VB.Menu mnuLCXT
Caption = "露采系统(&L)"
Begin VB.Menu mnuLCltcchUnit
Caption = "露天采场单元"
End
Begin VB.Menu bar21
Caption = "-"
End
Begin VB.Menu mnuLCbpglUnit
Caption = "边坡管理单元"
End
Begin VB.Menu bar22
Caption = "-"
End
Begin VB.Menu mnuLCyshUnit
Caption = "运输单元"
End
Begin VB.Menu bar23
Caption = "-"
End
Begin VB.Menu mnuLCgdUint
Caption = "供电单元"
End
Begin VB.Menu bar24
Caption = "-"
End
Begin VB.Menu mnuLCfpshUnit
Caption = "防排水单元"
End
Begin VB.Menu bar25
Caption = "-"
End
Begin VB.Menu mnuLCptchUnit
Caption = "排土场单元"
End
End
Begin VB.Menu mnuDCXT
Caption = "地采系统(&D)"
Begin VB.Menu mnuDCkshjxUnit
Caption = "矿山井巷单元"
End
Begin VB.Menu bar31
Caption = "-"
End
Begin VB.Menu mnuDCdxkcUnit
Caption = "地下开采单元"
End
Begin VB.Menu bar32
Caption = "-"
End
Begin VB.Menu mnuDCtshyshUnit
Caption = "提升运输单元"
End
Begin VB.Menu bar33
Caption = "-"
End
Begin VB.Menu mnuDCtffchUnit
Caption = "通风防尘单元"
End
Begin VB.Menu bar34
Caption = "-"
End
Begin VB.Menu mnuDCdqshbUnit
Caption = "电气设备单元"
End
Begin VB.Menu bar35
Caption = "-"
End
Begin VB.Menu mnuDCfpshUnit
Caption = "防排水单元"
End
Begin VB.Menu bar36
Caption = "-"
End
Begin VB.Menu mnuDCfmhUnit
Caption = "防灭火单元"
End
End
Begin VB.Menu mnuWKK
Caption = "尾矿库(&W)"
Begin VB.Menu mnuWKwkuUnit
Caption = "尾矿库单元"
End
End
Begin VB.Menu mnuHelp
Caption = "帮助(&H)"
Begin VB.Menu mnuHelpContent
Caption = "帮助主题..."
End
Begin VB.Menu bar41
Caption = "-"
End
Begin VB.Menu mnuAbout
Caption = "关于..."
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 MDIForm_Activate()
SecDelay (3) 'delay some secs 主窗体加载后与SPLASH 窗并存时间
End Sub
Private Sub MDIForm_Load()
mnuAQGL.Enabled = False
mnuLCXT.Enabled = False
mnuDCXT.Enabled = False
mnuWKK.Enabled = False
SetWindowLong frmSplash.hwnd, GWL_HWNDPARENT, Me.hwnd 'when the main form load the splash form display before it
On Error GoTo errh
If Mid(App.Path, Len(App.Path), 1) = "\" Then
dbPath = App.Path
Else
dbPath = App.Path & "\"
End If
Set sysDB = OpenDatabase(dbPath & "sysDB.mdb", False, False, ";pwd= ")
Exit Sub
errh:
MsgBox "系统数据库不存在或被破坏!"
End
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
Dim strTempFile As String, Location As String
If ErsOpened = True Then
EnterpriseRS.Close
End If
Set EnterpriseRS = Nothing
sysDB.Close
Set sysDB = Nothing
strTempFile = dbPath & "temp.mdb" ' 创建临时文件名
Location = dbPath & "sysDB.mdb"
If Len(Dir(strTempFile)) Then
Kill strTempFile
End If
DBEngine.CompactDatabase Location, strTempFile, , , ";PWD= " '通过DBEngine 压缩数据库文件
Kill Location ' 删除原来的数据库文件
FileCopy strTempFile, Location '拷贝刚刚压缩过临时数据库文件至原来位置
Kill strTempFile '删除临时文件
End Sub
Private Sub mnuAbout_Click()
MsgBox App.Title & " Version 1.0.0", vbInformation, "关于..."
End Sub
Private Sub mnuaqglUnit_Click()
If bFrmShow = False Then
frmAqgl.Show
Else
MsgBox "请先完成或关闭当前单元的评审!"
End If
End Sub
Private Sub mnuCloseKP_Click()
Call CloseKP
End Sub
Private Sub mnuDCdqshbUnit_Click()
If bFrmShow = False Then
FrmPublic.TableName = "DCdqshbUnit"
FrmPublic.Caption = "地采系统"
FrmPublic.Frame1.Caption = "电气设备单元"
FrmPublic.Show
Else
MsgBox "请先完成或关闭当前单元的评审!"
End If
End Sub
Private Sub mnuDCdxkcUnit_Click()
If bFrmShow = False Then
frmDcdxkcUnit.Show
Else
MsgBox "请先完成或关闭当前单元的评审!"
End If
End Sub
Private Sub mnuDCfmhUnit_Click()
If bFrmShow = False Then
FrmPublic.TableName = "DCfmhUnit"
FrmPublic.Caption = "地采系统"
FrmPublic.Frame1.Caption = "防灭火单元"
FrmPublic.Show
Else
MsgBox "请先完成或关闭当前单元的评审!"
End If
End Sub
Private Sub mnuDCfpshUnit_Click()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -