module1.bas

来自「GIS地理信息系统开发。大名鼎鼎的MAPX+VisualBasic6.0软件开发」· BAS 代码 · 共 36 行

BAS
36
字号
Attribute VB_Name = "Module1"
' This sample application and corresponding sample code is provided
' for example purposes only.  It has not undergone rigorous testing
' and as such should not be shipped as part of a final application
' without extensive testing on the part of the organization releasing
' the end-user product.

Public fMainForm As frmMain

Public Const RulerToolID = 104 ' This is the identifier used for the custom Ruler tool
Public Const PolyRulerToolID = 105 ' This is the identifier used for the custom Poly Ruler tool
' The behavior of these tools are implemented in Map1_ToolUsed and Map1_PolyToolUsed

' Ruler Parameters:
Public UsePolyRuler As Boolean ' If UsePolyRuler is true, then use the polygon length tool
                         ' if not, use the line length tool
Public RulerUnit As Integer ' The MapInfo constant for the unit that the ruler length
                         ' should be in (e.g. miUnitMile)
Public RulerUnitString As String ' The string corresponding to that ruler unit
                              ' (e.g. "Miles")

' Exporting Parameters:
Public ExportHeight As Double ' These are dimensions of the printed/exported output
Public ExportWidth As Double ' They can be set in the "Options" dialog

Public ExportFormat As Integer ' This is the constant that corresponds to the format
                            ' of the exported bitmap (e.g. miFormatBMP)
Public ExportFormatString As String ' This is the name of the format (e.g. "Windows Bitmap")
Public ExportFormatExt As String ' This is the 3 letter long extension that
                            ' corresponds to the format (e.g. "*.bmp")

Sub Main()
    Set fMainForm = New frmMain
    fMainForm.Show
End Sub

⌨️ 快捷键说明

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