📄 mapproperties.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form frmMapProperties
BorderStyle = 3 'Fixed Dialog
Caption = "地图属性"
ClientHeight = 3750
ClientLeft = 2370
ClientTop = 1275
ClientWidth = 4785
Icon = "MapProperties.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 3750
ScaleWidth = 4785
ShowInTaskbar = 0 'False
Begin VB.Frame Frame3
Height = 1455
Left = 120
TabIndex = 13
Top = 0
Width = 1935
Begin VB.CommandButton CmdAddLayer
Caption = "添加图层"
Height = 495
Left = 240
TabIndex = 14
Top = 360
Width = 1455
End
End
Begin VB.Frame Frame2
Height = 1335
Left = 120
TabIndex = 10
Top = 1680
Width = 1935
Begin VB.CheckBox chkAppearance
Caption = "3D 形状"
Height = 255
Left = 120
TabIndex = 12
Top = 720
Width = 1455
End
Begin VB.CheckBox chkScrollbars
Caption = "显示滚动条"
Height = 255
Left = 120
TabIndex = 11
Top = 240
Width = 1575
End
End
Begin VB.Frame Frame1
Height = 3015
Left = 2280
TabIndex = 3
Top = 0
Width = 2415
Begin VB.ComboBox cboCancelAction
Height = 315
ItemData = "MapProperties.frx":0442
Left = 240
List = "MapProperties.frx":044F
Style = 2 'Dropdown List
TabIndex = 6
Top = 1560
Width = 2055
End
Begin VB.ComboBox cboBorderStyle
Height = 315
ItemData = "MapProperties.frx":0489
Left = 240
List = "MapProperties.frx":0493
Style = 2 'Dropdown List
TabIndex = 5
Top = 600
Width = 2055
End
Begin VB.ComboBox cboMapUnits
Height = 315
ItemData = "MapProperties.frx":04AF
Left = 240
List = "MapProperties.frx":04BF
TabIndex = 4
Text = "cboMapUnits"
Top = 2520
Width = 2055
End
Begin VB.Label lblCancelAction
Caption = "按下Esc键的响应"
Height = 255
Left = 240
TabIndex = 9
Top = 1200
Width = 2055
End
Begin VB.Label lblMapBorder
Caption = "地图边界类型"
Height = 255
Left = 240
TabIndex = 8
Top = 360
Width = 1215
End
Begin VB.Label lblMapUnits
Caption = "地图单位"
Height = 255
Left = 240
TabIndex = 7
Top = 2160
Width = 1815
End
End
Begin VB.CommandButton cmdOK
Caption = "关闭"
Height = 375
Left = 3600
TabIndex = 2
Top = 3240
Width = 1095
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 4320
Top = 2640
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.PictureBox picMapBackColor
BackColor = &H00FFFFFF&
Height = 375
Left = 120
ScaleHeight = 315
ScaleWidth = 795
TabIndex = 0
Top = 3240
Width = 855
End
Begin VB.Label lblMapBackColor
Caption = "选择地图背景色"
Height = 255
Left = 1080
TabIndex = 1
Top = 3240
Width = 1575
End
End
Attribute VB_Name = "frmMapProperties"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'Private Sub cboMapUnits_Click()
'
''Set the global strMapUnits variable
'frmmain.strMapUnits = cboMapUnits.List(cboMapUnits.ListIndex)
'
''Update the scale display area
'frmmain.updateScale
'
'End Sub
Private Sub CmdAddLayer_Click()
frmmain.AddFile
'Update the MapTip layer and field values in the combo boxes.
'If frmmain.chkTipLayer.Value = 1 Then frmmain.refreshMapTips
End Sub
'Private Sub CmdAddSDE_Click()
'
' Load frmConnectSDE
' frmConnectSDE.Show vbModal
' 'Update the MapTip layer and field values in the combo boxes.
' If frmmain.ChkTiplayer.Value = 1 Then frmmain.refreshMapTips
'
'End Sub
Private Sub Cmdok_Click()
Unload Me
End Sub
Private Sub Form_Load()
'Align the left of this form with the left of the Main form.
Me.Left = (Screen.Width - Me.Width) / 2
'Position this form just under the Main form, unless
'that puts it off the bottom of the screen in which
'case, align the bottom of this form with the bottom
'of the screen.
' If (Me.Height + frmmain.Top + frmmain.Height) > Screen.Height Then
Me.Top = (Screen.Height - Me.Height) / 2
' Else
' Me.Top = frmmain.Top + frmmain.Height
' End If
'Set defaults for scrollbar, borderstyle and cancel action.
Select Case frmmain.Map1.ScrollBars
Case True: chkScrollbars.Value = 1
Case False: chkScrollbars.Value = 0
End Select
chkAppearance.Value = frmmain.Map1.Appearance
cboBorderStyle.ListIndex = frmmain.Map1.BorderStyle
cboCancelAction.ListIndex = frmmain.Map1.CancelAction
'If the map already knows its map units, populate the
'map units combobox with that information.
Select Case frmmain.strMapUnits
Case "Unknown": cboMapUnits.ListIndex = 0
Case "Decimal Degrees": cboMapUnits.ListIndex = 1
Case "Meters": cboMapUnits.ListIndex = 2
Case "Feet": cboMapUnits.ListIndex = 3
End Select
cboMapUnits.Enabled = False
'Report the BackColor of the map
picMapBackColor.BackColor = frmmain.Map1.BackColor
End Sub
Private Sub cboBorderStyle_Click()
'Set the border status by extracting the first
'letter from the selected item from the combo box.
Dim status As Integer
status = Left(cboBorderStyle.Text, 1)
frmmain.Map1.BorderStyle = status
End Sub
Private Sub cboCancelAction_Click()
'Set the cancel status by extracting the first
'letter from the selected item from the combo box.
Dim status As Integer
status = Left(cboCancelAction.Text, 1)
frmmain.Map1.CancelAction = status
End Sub
Private Sub chkAppearance_Click()
'Set appearance to 3D or Flat
If chkAppearance.Value = 1 Then
frmmain.Map1.Appearance = mo3D
ElseIf chkAppearance.Value = 0 Then
frmmain.Map1.Appearance = moFlat
End If
End Sub
Private Sub chkScrollbars_Click()
'Turn the map display scroll bars on or off
If chkScrollbars.Value = 0 Then
frmmain.Map1.ScrollBars = False
ElseIf chkScrollbars.Value = 1 Then
frmmain.Map1.ScrollBars = True
End If
End Sub
Private Sub picMapBackColor_Click()
'Set the background canvas color of the map
CommonDialog1.ShowColor
picMapBackColor.BackColor = CommonDialog1.Color
frmmain.Map1.BackColor = picMapBackColor.BackColor
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -