?? frmmain.frm
字號(hào):
VERSION 5.00
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 frmMain
Caption = "道路中樁計(jì)算"
ClientHeight = 8730
ClientLeft = 60
ClientTop = 750
ClientWidth = 10830
LinkTopic = "Form1"
ScaleHeight = 8730
ScaleWidth = 10830
StartUpPosition = 3 '窗口缺省
Begin MSComctlLib.Toolbar tbToolBar
Align = 1 'Align Top
Height = 420
Left = 0
TabIndex = 1
Top = 0
Width = 10830
_ExtentX = 19103
_ExtentY = 741
ButtonWidth = 609
Appearance = 1
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 5
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "打開"
Object.ToolTipText = "打開"
ImageKey = "Open"
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "保存"
Object.ToolTipText = "保存"
ImageKey = "Save"
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "打印"
Object.ToolTipText = "打印"
ImageKey = "Print"
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "按鈕"
Object.ToolTipText = "按鈕"
ImageKey = "Button"
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "幫助"
Object.ToolTipText = "幫助"
ImageKey = "Help"
EndProperty
EndProperty
End
Begin MSComctlLib.StatusBar sbStatusBar
Align = 2 'Align Bottom
Height = 270
Left = 0
TabIndex = 0
Top = 8460
Width = 10830
_ExtentX = 19103
_ExtentY = 476
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 13441
Text = "狀態(tài)"
TextSave = "狀態(tài)"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
AutoSize = 2
TextSave = "2003-9-5"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
AutoSize = 2
TextSave = "10:01"
EndProperty
EndProperty
End
Begin MSComDlg.CommonDialog dlgCommonDialog
Left = 1740
Top = 1305
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Menu mnuFile
Caption = "文件(&F)"
Begin VB.Menu mnuFileNew
Caption = "新建(&N)"
Shortcut = ^N
End
Begin VB.Menu mnuFileOpen
Caption = "打開(&O)..."
End
Begin VB.Menu mnuFileClose
Caption = "關(guān)閉(&C)"
End
Begin VB.Menu mnuFileBar0
Caption = "-"
End
Begin VB.Menu mnuFileSave
Caption = "保存(&S)"
End
Begin VB.Menu mnuFileSaveAs
Caption = "另存為(&A)..."
End
Begin VB.Menu mnuFileSaveAll
Caption = "全部保存(&L)"
End
Begin VB.Menu mnuFileBar1
Caption = "-"
End
Begin VB.Menu mnuFileProperties
Caption = "屬性(&I)"
End
Begin VB.Menu mnuFileBar2
Caption = "-"
End
Begin VB.Menu mnuFilePageSetup
Caption = "頁面設(shè)置(&U)..."
End
Begin VB.Menu mnuFilePrintPreview
Caption = "打印預(yù)覽(&V)"
End
Begin VB.Menu mnuFilePrint
Caption = "打印(&P)..."
End
Begin VB.Menu mnuFileBar3
Caption = "-"
End
Begin VB.Menu mnuFileSend
Caption = "發(fā)送(&D)..."
End
Begin VB.Menu mnuFileBar4
Caption = "-"
End
Begin VB.Menu mnuFileMRU
Caption = ""
Index = 1
Visible = 0 'False
End
Begin VB.Menu mnuFileMRU
Caption = ""
Index = 2
Visible = 0 'False
End
Begin VB.Menu mnuFileMRU
Caption = ""
Index = 3
Visible = 0 'False
End
Begin VB.Menu mnuFileBar5
Caption = "-"
Visible = 0 'False
End
Begin VB.Menu mnuFileExit
Caption = "退出(&X)"
End
End
Begin VB.Menu mnuEdit
Caption = "編輯(&E)"
Begin VB.Menu mnuEditUndo
Caption = "撤消(&U)"
End
Begin VB.Menu mnuEditBar0
Caption = "-"
End
Begin VB.Menu mnuEditCut
Caption = "剪切(&T)"
Shortcut = ^X
End
Begin VB.Menu mnuEditCopy
Caption = "復(fù)制(&C)"
Shortcut = ^C
End
Begin VB.Menu mnuEditPaste
Caption = "粘貼(&P)"
Shortcut = ^V
End
Begin VB.Menu mnuEditPasteSpecial
Caption = "選擇性粘貼(&S)..."
End
End
Begin VB.Menu mnuHelp
Caption = "幫助(&H)"
Begin VB.Menu mnuHelpContents
Caption = "目錄(&C)"
End
Begin VB.Menu mnuHelpSearchForHelpOn
Caption = "搜索幫助主題(&S)..."
End
Begin VB.Menu mnuHelpBar0
Caption = "-"
End
Begin VB.Menu mnuHelpAbout
Caption = "關(guān)于(&A) "
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
Private Sub Form_Load()
Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim i As Integer
'close all sub forms
For i = Forms.Count - 1 To 1 Step -1
Unload Forms(i)
Next
If Me.WindowState <> vbMinimized Then
SaveSetting App.Title, "Settings", "MainLeft", Me.Left
SaveSetting App.Title, "Settings", "MainTop", Me.Top
SaveSetting App.Title, "Settings", "MainWidth", Me.Width
SaveSetting App.Title, "Settings", "MainHeight", Me.Height
End If
End Sub
Private Sub tbToolBar_ButtonClick(ByVal Button As MSComCtlLib.Button)
On Error Resume Next
Select Case Button.Key
Case "打開"
mnuFileOpen_Click
Case "保存"
mnuFileSave_Click
Case "打印"
mnuFilePrint_Click
Case "按鈕"
'應(yīng)做:添加 '按鈕' 按鈕代碼。
MsgBox "添加 '按鈕' 按鈕代碼。"
Case "幫助"
'應(yīng)做:添加 '幫助' 按鈕代碼。
MsgBox "添加 '幫助' 按鈕代碼。"
End Select
End Sub
Private Sub mnuHelpAbout_Click()
frmAbout.Show vbModal, Me
End Sub
Private Sub mnuHelpSearchForHelpOn_Click()
Dim nRet As Integer
'如果這個(gè)工程沒有幫助文件,顯示消息給用戶
'可以在“工程屬性”對(duì)話框中為應(yīng)用程序設(shè)置幫助文件
If Len(App.HelpFile) = 0 Then
MsgBox "無法顯示幫助目錄,該工程沒有相關(guān)聯(lián)的幫助。", vbInformation, Me.Caption
Else
On Error Resume Next
nRet = OSWinHelp(Me.hwnd, App.HelpFile, 261, 0)
If Err Then
MsgBox Err.Description
End If
End If
End Sub
Private Sub mnuHelpContents_Click()
Dim nRet As Integer
'如果這個(gè)工程沒有幫助文件,顯示消息給用戶
'可以在“工程屬性”對(duì)話框中為應(yīng)用程序設(shè)置幫助文件
If Len(App.HelpFile) = 0 Then
MsgBox "無法顯示幫助目錄,該工程沒有相關(guān)聯(lián)的幫助。", vbInformation, Me.Caption
Else
On Error Resume Next
nRet = OSWinHelp(Me.hwnd, App.HelpFile, 3, 0)
If Err Then
MsgBox Err.Description
End If
End If
End Sub
Private Sub mnuEditPasteSpecial_Click()
'應(yīng)做:添加 'mnuEditPasteSpecial_Click' 代碼。
MsgBox "添加 'mnuEditPasteSpecial_Click' 代碼。"
End Sub
Private Sub mnuEditPaste_Click()
'應(yīng)做:添加 'mnuEditPaste_Click' 代碼。
MsgBox "添加 'mnuEditPaste_Click' 代碼。"
End Sub
Private Sub mnuEditCopy_Click()
'應(yīng)做:添加 'mnuEditCopy_Click' 代碼。
MsgBox "添加 'mnuEditCopy_Click' 代碼。"
End Sub
Private Sub mnuEditCut_Click()
'應(yīng)做:添加 'mnuEditCut_Click' 代碼。
MsgBox "添加 'mnuEditCut_Click' 代碼。"
End Sub
Private Sub mnuEditUndo_Click()
'應(yīng)做:添加 'mnuEditUndo_Click' 代碼。
MsgBox "添加 'mnuEditUndo_Click' 代碼。"
End Sub
Private Sub mnuFileExit_Click()
'卸載窗體
Unload Me
End Sub
Private Sub mnuFileSend_Click()
'應(yīng)做:添加 'mnuFileSend_Click' 代碼。
MsgBox "添加 'mnuFileSend_Click' 代碼。"
End Sub
Private Sub mnuFilePrint_Click()
'應(yīng)做:添加 'mnuFilePrint_Click' 代碼。
MsgBox "添加 'mnuFilePrint_Click' 代碼。"
End Sub
Private Sub mnuFilePrintPreview_Click()
'應(yīng)做:添加 'mnuFilePrintPreview_Click' 代碼。
MsgBox "添加 'mnuFilePrintPreview_Click' 代碼。"
End Sub
Private Sub mnuFilePageSetup_Click()
On Error Resume Next
With dlgCommonDialog
.DialogTitle = "頁面設(shè)置"
.CancelError = True
.ShowPrinter
End With
End Sub
Private Sub mnuFileProperties_Click()
'應(yīng)做:添加 'mnuFileProperties_Click' 代碼。
MsgBox "添加 'mnuFileProperties_Click' 代碼。"
End Sub
Private Sub mnuFileSaveAll_Click()
'應(yīng)做:添加 'mnuFileSaveAll_Click' 代碼。
MsgBox "添加 'mnuFileSaveAll_Click' 代碼。"
End Sub
Private Sub mnuFileSaveAs_Click()
'應(yīng)做:添加 'mnuFileSaveAs_Click' 代碼。
MsgBox "添加 'mnuFileSaveAs_Click' 代碼。"
End Sub
Private Sub mnuFileSave_Click()
'應(yīng)做:添加 'mnuFileSave_Click' 代碼。
MsgBox "添加 'mnuFileSave_Click' 代碼。"
End Sub
Private Sub mnuFileClose_Click()
'應(yīng)做:添加 'mnuFileClose_Click' 代碼。
MsgBox "添加 'mnuFileClose_Click' 代碼。"
End Sub
Private Sub mnuFileOpen_Click()
Dim sFile As String
With dlgCommonDialog
.DialogTitle = "打開"
.CancelError = False
'ToDo: 設(shè)置 common dialog 控件的標(biāo)志和屬性
.Filter = "所有文件 (*.*)|*.*"
.ShowOpen
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
'ToDo: 添加處理打開的文件的代碼
End Sub
Private Sub mnuFileNew_Click()
'應(yīng)做:添加 'mnuFileNew_Click' 代碼。
MsgBox "添加 'mnuFileNew_Click' 代碼。"
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -