📄 mainform.frm
字号:
Map.Layers.Layer9.DrawLabelsAfter= 0 'False
Map.Layers.Layer9.ZoomLayering= 0 'False
Map.Layers.Layer9.ZoomMin= 0
Map.Layers.Layer9.ZoomMax= 0
Map.Layers.Layer9.DoOverrideStyle= 0 'False
Map.Layers.Layer9.LabelProperties.LabelMax= 100
Map.Layers.Layer9.LabelProperties.Overlap= 0 'False
Map.Layers.Layer9.LabelProperties.Duplicate= -1 'True
Map.Layers.Layer9.LabelProperties.Offset= 2
Map.Layers.Layer9.LabelProperties.LineType= 0
Map.Layers.Layer9.LabelProperties.Zoom= -1 'True
Map.Layers.Layer9.LabelProperties.ZoomMin= 0
Map.Layers.Layer9.LabelProperties.ZoomMax= 10000
Map.Layers.Layer9.LabelProperties.Visible= -1 'True
Map.Layers.Layer9.LabelProperties.Position= 0
Map.Layers.Layer9.LabelProperties.Parellel= -1 'True
Map.Layers.Layer9.LabelProperties.PartialSegments= 0 'False
Map.Layers.Layer9.LabelProperties.Style.TextFontBackColor= 16777215
Map.Layers.Layer9.LabelProperties.Style.SymbolChar= 0
BeginProperty Map.Layers.Layer9.LabelProperties.Style.TextFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Map.Layers.Layer9.LabelProperties.Style.SymbolFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Map.Layers.Layer9.LabelProperties.Style.LineStyle= 1
Map.Layers.Layer9.LabelProperties.Style.LineWidth= 1
Map.NumericCoordSys.ProjectionInfo= "MainForm.frx":000C
Map.DisplayCoordSys.ProjectionInfo= "MainForm.frx":013C
Map.Zoom = 3500
Map.CenterX = -95.6166331741087
Map.CenterY = 38.2558614060309
FeatureEditMode = 1
End
Begin VB.CommandButton cmdDefault
Caption = "Default &View"
Height = 500
Left = 6480
TabIndex = 14
Top = 4500
Width = 1815
End
Begin VB.CommandButton cmdDotDensity
Caption = "Clear &Dot Density Theme"
Height = 500
Left = 60
TabIndex = 12
Top = 6060
Width = 1755
End
Begin VB.CheckBox ckCities
Caption = "Sho&w Cities"
Height = 255
Left = 2160
TabIndex = 11
Top = 5280
Width = 1455
End
Begin VB.CommandButton cmdHideCustomersNumber
Caption = "Clear Closest C&ustomers number"
Height = 500
Left = 60
TabIndex = 10
Top = 5520
Width = 1755
End
Begin VB.CommandButton cmdClearForecast
Caption = "&Hide Sales Forecast"
Height = 500
Left = 60
TabIndex = 9
Top = 4980
Width = 1755
End
Begin VB.CommandButton cmdPrint
Caption = "&Print Report"
Height = 500
Left = 6480
TabIndex = 8
Top = 1860
Width = 1815
End
Begin VB.CommandButton btnClose
Caption = "E&xit"
Height = 500
Left = 6480
TabIndex = 7
Top = 6000
Width = 1815
End
Begin VB.CommandButton btnSalesTheme
Caption = "Refresh Sales &Forecast"
Height = 500
Left = 6480
TabIndex = 6
Top = 3060
Width = 1815
End
Begin VB.CheckBox ckHighways
Caption = "Show Hi&ghways"
Height = 255
Left = 2160
TabIndex = 5
Top = 4980
Width = 1455
End
Begin VB.CommandButton btnSaveHubs
Caption = "&Save Hubs Placement"
Height = 500
Left = 6480
TabIndex = 4
Top = 1260
Width = 1815
End
Begin VB.CommandButton btnAdjustTheme
Caption = "Adjust &Theme"
Height = 500
Left = 6480
TabIndex = 3
Top = 2460
Width = 1815
End
Begin VB.CommandButton btnMoveDelete
Caption = "&Move / Delete Hubs"
Height = 500
Left = 6480
TabIndex = 2
Top = 660
Width = 1815
End
Begin VB.CommandButton btnNewHub
Caption = "&Add Distribution Hub"
Height = 500
Left = 6480
TabIndex = 1
Top = 60
Width = 1815
End
Begin VB.CommandButton btnRecalc
Caption = "Count and display number of c&losest cities/customers"
Height = 735
Left = 6480
TabIndex = 0
Top = 3660
Width = 1815
End
Begin ComctlLib.ImageList imlIcons
Left = 4620
Top = 5100
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
_Version = 327682
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 7
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "MainForm.frx":026C
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "MainForm.frx":0586
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "MainForm.frx":08A0
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "MainForm.frx":0BBA
Key = ""
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "MainForm.frx":0ED4
Key = ""
EndProperty
BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "MainForm.frx":11EE
Key = ""
EndProperty
BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "MainForm.frx":1508
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "FormMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
' 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.
Dim rsHubs, rsCustomers As Recordset, HubsDB As Database, gX As Double, gY As Double
Dim bActivateSet As Boolean, hubTheme As MapXLib.Theme, hubLegend As MapXLib.Legend, iHubs As Integer
Private Sub btnAdjustTheme_Click()
ModifyTheme.Activate mapxMap
End Sub
Private Sub btnClose_Click()
Unload FormMain
End Sub
Private Sub btnMoveDelete_Click()
Dim btn As Button
mapxMap.CurrentTool = miArrowTool
For Each btn In tlbMapTools.Buttons
If btn.Style = tbrCheck Then
If btn.Index = 1 Then
btn.Value = 1
Else
btn.Value = 0
End If
End If
Next
End Sub
Private Sub btnNewHub_Click()
Dim btn As Button
mapxMap.CurrentTool = 1
For Each btn In tlbMapTools.Buttons
If btn.Style = tbrCheck Then
btn.Value = 0
End If
Next
End Sub
Private Sub btnRecalc_Click()
RecalcClosestCustomers
End Sub
Private Sub btnSalesTheme_Click()
Dim r As Integer
If rsHubs.BOF And rsHubs.EOF Then
r = MsgBox("There are no hubs", vbOKOnly + vbExclamation, "Hub placement analysis")
Exit Sub
End If
ShowSalesForecast
End Sub
Private Sub btnSaveHubs_Click()
Dim AnnotNum As Integer, i As Integer
StoreHubPlacement
HubsDB.Execute "Delete * From Hubs"
HubsDB.Execute "Insert Into Hubs Select * From ztHubs"
End Sub
Private Sub ckCities_Click()
If Not bActivateSet Then
Exit Sub
End If
mapxMap.Layers("US Major Cities").Visible = (ckCities.Value = 1)
End Sub
Private Sub ckHighways_Click()
If Not bActivateSet Then
Exit Sub
End If
mapxMap.Layers("US Highway").Visible = (ckHighways.Value = 1)
End Sub
Private Sub cmdClearForecast_Click()
On Error Resume Next
mapxMap.DataSets("Customers").Themes("Sales").Visible = False
End Sub
Private Sub cmdDefault_Click()
MakeDefaultMapView
mapxMap.CenterX = -95
mapxMap.CenterY = 38
End Sub
Private Sub cmdDotDensity_Click()
Dim bVisible As Boolean
bVisible = mapxMap.DataSets("Customers").Themes("Population").Visible
mapxMap.DataSets("Customers").Themes("Population").Visible = (Not bVisible)
If bVisible Then
cmdDotDensity.Caption = "Show &Dot Density Theme"
Else
cmdDotDensity.Caption = "Clear &Dot Density Theme"
End If
End Sub
Private Sub cmdHideCustomersNumber_Click()
DeleteTextAnnotations
End Sub
Private Sub cmdPrint_Click()
PrintMapX mapxMap
End Sub
Private Sub ChooseSymbolStyle()
Dim annot As MapXLib.Annotation
mapxMap.DefaultStyle.PickSymbol
For Each annot In mapxMap.Annotations
If annot.Type = miSymbolAnnotation Then
CopyMapXFont annot.Graphic.Style.SymbolFont, mapxMap.DefaultStyle.SymbolFont
annot.Graphic.Style.SymbolCharacter = mapxMap.DefaultStyle.SymbolCharacter
annot.Graphic.Style.SymbolFontBackColor = mapxMap.DefaultStyle.SymbolFontBackColor
annot.Graphic.Style.SymbolFontColor = mapxMap.DefaultStyle.SymbolFontColor
annot.Graphic.Style.SymbolFontHalo = mapxMap.DefaultStyle.SymbolFontHalo
annot.Graphic.Style.SymbolFontOpaque = mapxMap.DefaultStyle.SymbolFontOpaque
annot.Graphic.Style.SymbolFontShadow = mapxMap.DefaultStyle.SymbolFontShadow
End If
Next
MakeHubsLegendStyle
End Sub
Private Sub ChooseTextStyle()
Dim annot As MapXLib.Annotation
mapxMap.DefaultStyle.PickText
For Each annot In mapxMap.Annotations
If annot.Type = miTextAnnotation Then
CopyMapXFont annot.Graphic.Style.TextFont, mapxMap.DefaultStyle.TextFont
annot.Graphic.Style.TextFontAllCaps = mapxMap.DefaultStyle.TextFontAllCaps
annot.Graphic.Style.TextFontBackColor = mapxMap.DefaultStyle.TextFontBackColor
annot.Graphic.Style.TextFontColor = mapxMap.DefaultStyle.TextFontColor
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -