?? formmain.frm
字號:
VERSION 5.00
Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form formmain
Caption = "Form1"
ClientHeight = 10605
ClientLeft = 255
ClientTop = 735
ClientWidth = 15240
FillColor = &H00FFFFFF&
ForeColor = &H00FFFFFF&
Icon = "formmain.frx":0000
LinkTopic = "Form1"
ScaleHeight = 10605
ScaleWidth = 15240
WindowState = 2 'Maximized
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 1
Top = 10230
Width = 15240
_ExtentX = 26882
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 20241
MinWidth = 5292
Text = "版權: 中國海洋石油總公司 Designed By zh"
TextSave = "版權: 中國海洋石油總公司 Designed By zh"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 1
Object.Width = 3528
MinWidth = 3528
Text = "經濟評價系統1.0"
TextSave = "經濟評價系統1.0"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
TextSave = "16:24"
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "黑體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Threed.SSPanel SSPanel1
Height = 9735
Left = 0
TabIndex = 2
Top = 480
Width = 10935
_Version = 65536
_ExtentX = 19288
_ExtentY = 17171
_StockProps = 15
ForeColor = 16777152
BackColor = 12640511
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BorderWidth = 2
BevelOuter = 1
BevelInner = 1
Begin VB.Image Image1
Height = 9585
Left = 60
Picture = "formmain.frx":0442
Stretch = -1 'True
Top = 60
Width = 14130
End
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 480
Top = 1560
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSComctlLib.ImageList ImageList1
Left = 1920
Top = 2520
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 26
ImageHeight = 24
MaskColor = 12632256
UseMaskColor = 0 'False
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 10
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "formmain.frx":52C2
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "formmain.frx":5714
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "formmain.frx":5FEE
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "formmain.frx":6668
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "formmain.frx":6ABA
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "formmain.frx":6DD4
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "formmain.frx":8056
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "formmain.frx":8930
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "formmain.frx":8D82
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "formmain.frx":909C
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 480
Left = 0
TabIndex = 0
Top = 0
Width = 15240
_ExtentX = 26882
_ExtentY = 847
ButtonWidth = 873
ButtonHeight = 794
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 12
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "新建"
ImageIndex = 10
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "打開"
ImageIndex = 2
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "保存"
ImageIndex = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "生產動態數據"
ImageIndex = 4
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "化學劑注入表"
ImageIndex = 5
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "工程投資表"
ImageIndex = 6
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "經濟基本參數"
ImageIndex = 7
EndProperty
BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "圖表輸出"
ImageIndex = 8
EndProperty
BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "退出"
ImageIndex = 9
EndProperty
EndProperty
BorderStyle = 1
End
Begin VB.Menu mxiangmu
Caption = "項目(&F)"
NegotiatePosition= 1 'Left
Begin VB.Menu mnew
Caption = "新建項目"
End
Begin VB.Menu mopen
Caption = "打開項目"
End
Begin VB.Menu msave
Caption = "保存..."
End
Begin VB.Menu m
Caption = "-"
End
Begin VB.Menu mexit
Caption = "退出"
End
End
Begin VB.Menu minput
Caption = "數據輸入(&I)"
Begin VB.Menu mpro
Caption = "生產動態數據"
End
Begin VB.Menu mploy
Caption = "化學劑注入表"
End
Begin VB.Menu minvest
Caption = "工程投資表"
End
Begin VB.Menu meco
Caption = "經濟基本參數"
End
End
Begin VB.Menu moutput
Caption = "圖表輸出(&O)"
End
Begin VB.Menu mhelp
Caption = "幫助(&H)"
Begin VB.Menu mhelpf
Caption = "幫助文件"
End
Begin VB.Menu mjj
Caption = "-"
End
Begin VB.Menu mabout
Caption = "關于..."
End
End
End
Attribute VB_Name = "formmain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
SSPanel1.Width = Me.Width
'SSPanel1.Height = Me.Height - StatusBar1.Height-
'SSPanel1.Height = StatusBar1.Top
Image1.Width = Me.Width - 150
'Picture1.Height = Me.Height - StatusBar1.Height - 2000
'設置有效性
mxiangmu.Enabled = True
minput.Enabled = False
moutput.Enabled = False
'mhelp.Enabled = False
App.HelpFile = App.Path & "\help.chm"
For Index = 4 To 11
Toolbar1.Buttons.Item(Index).Enabled = False
Next Index
Toolbar1.Buttons.Item(5).Enabled = True
Toolbar1.Buttons.Item(10).Enabled = True
End Sub
Private Sub Form_Unload(Cancel As Integer)
'mexit_Click
End Sub
Private Sub mabout_Click()
Load about
about.Show 1
End Sub
Private Sub meco_Click()
Load frmeco
frmeco.Show
End Sub
Private Sub mexit_Click()
msg$ = "確認退出軟件? "
Title$ = "退出"
xchoose = MsgBox(msg$, 36, Title$)
If xchoose = 6 Then
End
Unload Me
Else
Load Me
End If
End Sub
Private Sub mhelpf_Click()
SendKeys "{F1}" '發送擊鍵到活動窗口
End Sub
Private Sub minvest_Click()
Load frminvest
frminvest.Show
End Sub
Private Sub mnew_Click() '新建項目
mxiangmu.Enabled = True
minput.Enabled = True
moutput.Enabled = False
mhelp.Enabled = True
mpro.Enabled = True
mploy.Enabled = False
meco.Enabled = False
minvest.Enabled = False
msave.Enabled = False
Unload frmpro
Unload frmpoly
Unload frmeco
Unload frminvest
Beep
For Index = 4 To 10
Toolbar1.Buttons.Item(Index).Enabled = True
Next Index
Toolbar1.Buttons.Item(4).Enabled = False
Toolbar1.Buttons.Item(7).Enabled = False
Toolbar1.Buttons.Item(8).Enabled = False
Toolbar1.Buttons.Item(9).Enabled = False
Toolbar1.Buttons.Item(11).Enabled = False
'
newis = 1: flag(1) = 1: flag(2) = 1: flag(3) = 1: flag(4) = 1 '新建項目標志
workpath = App.Path
End Sub
Private Sub mopen_Click() '打開
On Error GoTo errhandler
CommonDialog1.CancelError = True
workpath = App.Path
CommonDialog1.InitDir = workpath
CommonDialog1.Filter = "海上項目數據文件 (*.mdo)|*.mdo"
CommonDialog1.DefaultExt = "*.mdo"
CommonDialog1.ShowOpen
CommonDialog1.FilterIndex = 2
If Dir(CommonDialog1.filename) <> "" Then
filename$ = Trim$(CommonDialog1.FileTitle)
mxiangmu.Enabled = True
minput.Enabled = True
moutput.Enabled = True
mhelp.Enabled = True
mpro.Enabled = True
mploy.Enabled = 1
meco.Enabled = 1
minvest.Enabled = 1
msave.Enabled = False
For Index = 4 To 11
Toolbar1.Buttons.Item(Index).Enabled = True
Next Index
'Toolbar1.Buttons.Item(7).Enabled = False
'Toolbar1.Buttons.Item(8).Enabled = False
'Toolbar1.Buttons.Item(9).Enabled = False
Unload frmpro
Unload frmpoly
Unload frmeco
Unload frminvest
Else
Beep
MsgBox "文件未找到!", 48, "警告"
Me.Show
Me.Enabled = -1
Exit Sub
End If
OpeningDatabase = CommonDialog1.filename
Me.Caption = "經濟評價系統 [版本1.0]" & "--" & filename$
'ZwTxtName = Left$(OpeningDatabase, Len(OpeningDatabase) - 4)
'Zwfilename = OpeningDatabase
'ZwfileQiTaPathdat = OpeningDatabase + "QiTa.dat"
newis = 2: flag(1) = 2: flag(2) = 2: flag(3) = 2: flag(4) = 2
errhandler:
MousePointer = 0
Me.Enabled = -1
'workpath = CommonDialog1.InitDir
''
End Sub
Private Sub moutput_Click()
frmoutput.Show 1
End Sub
Private Sub mploy_Click()
Load frmpoly
frmpoly.Show 1
End Sub
Private Sub mpro_Click()
Load frmpro
frmpro.Show 1
End Sub
Private Sub msave_Click()
On Error GoTo errhandler
CommonDialog1.CancelError = False
1 CommonDialog1.Filter = "海上項目數據文件 (*.mdo)|*.mdo"
'CommonDialog1.filename =
CommonDialog1.ShowSave
CommonDialog1.FilterIndex = 2
CommonDialog1.FilterIndex = 2
If Dir(CommonDialog1.filename) <> "" Then
Beep
msg$ = "警告:" + CommonDialog1.filename + "已經存在。" + Chr$(13) + Chr$(10) + Chr$(13) + Chr$(10) + "要替換嗎?"
xchoose = MsgBox(msg$, 49, "警告")
If xchoose = 2 Then GoTo 1
End If
filename$ = Trim$(CommonDialog1.FileTitle)
Set FileSystemObject = CreateObject("scripting.FileSystemObject")
FileSystemObject.copyfile OpeningDatabase, CommonDialog1.filename
OpeningDatabase = CommonDialog1.filename
Me.Caption = "經濟評價系統 [版本1.0]" & "--" & filename$
newis = 2: flag(1) = 2: flag(2) = 2: flag(3) = 2: flag(4) = 2
errhandler:
Me.Enabled = -1
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 2 '新建
Call mnew_Click
Case 3 '打開
Call mopen_Click
Case 4 '保存
Call msave_Click
Case 6 '生產動態數據
mpro_Click
Case 7 '化學藥劑
mploy_Click
Case 8 '投資
minvest_Click
Case 9
meco_Click
Case 11
moutput_Click
Case 12
mexit_Click
End Select
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -