📄 displayproperties.frm
字号:
VERSION 5.00
Begin VB.Form DisplayProperties
BorderStyle = 3 'Fixed Dialog
Caption = "Display Properties"
ClientHeight = 4095
ClientLeft = 2535
ClientTop = 2715
ClientWidth = 4050
Icon = "DisplayProperties.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 4095
ScaleWidth = 4050
ShowInTaskbar = 0 'False
Begin VB.Frame frmZoomLayer
Caption = "Zoom Layering"
Height = 1575
Left = 180
TabIndex = 6
Top = 1680
Width = 3615
Begin VB.TextBox txtMaxZoom
Height = 315
Left = 1380
TabIndex = 12
Top = 1080
Width = 1035
End
Begin VB.TextBox txtMinZoom
Height = 315
Left = 1380
TabIndex = 9
Top = 660
Width = 1035
End
Begin VB.CheckBox ckZoomRange
Caption = "Display within &Zoom Range:"
Height = 255
Left = 240
TabIndex = 7
Top = 300
Width = 2355
End
Begin VB.Label lblUnit2
Height = 255
Left = 2520
TabIndex = 13
Top = 1080
Width = 915
End
Begin VB.Label lblUnit1
Height = 255
Left = 2520
TabIndex = 10
Top = 720
Width = 915
End
Begin VB.Label lblMaxZoom
Caption = "Ma&x Zoom:"
Height = 255
Left = 480
TabIndex = 11
Top = 1140
Width = 855
End
Begin VB.Label lblMinZoom
Caption = "&Mim Zoom:"
Height = 255
Left = 480
TabIndex = 8
Top = 720
Width = 915
End
End
Begin VB.CommandButton cmdFontStyle
Caption = "Aa"
Height = 495
Left = 2520
TabIndex = 5
Top = 900
Width = 555
End
Begin VB.CommandButton cmdPointStyle
Caption = "Pnt"
Height = 495
Left = 1800
TabIndex = 4
Top = 900
Width = 555
End
Begin VB.CommandButton cmdLineStyle
Caption = "Line"
Height = 495
Left = 1080
TabIndex = 3
Top = 900
Width = 555
End
Begin VB.CommandButton cmdRegionStyle
Caption = "Reg"
Height = 495
Left = 360
TabIndex = 2
Top = 900
Width = 555
End
Begin VB.Frame frmDisplayMode
Caption = "Display Mode"
Height = 1395
Left = 180
TabIndex = 0
Top = 180
Width = 3615
Begin VB.CheckBox ckStyleOver
Caption = "&Style Override"
Height = 255
Left = 240
TabIndex = 1
Top = 300
Width = 1395
End
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "&Cancel"
Height = 375
Left = 2100
TabIndex = 14
Top = 3540
Width = 1215
End
Begin VB.CommandButton cmdOk
Caption = "&OK"
Default = -1 'True
Height = 375
Left = 660
TabIndex = 15
Top = 3540
Width = 1215
End
End
Attribute VB_Name = "DisplayProperties"
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 iInd As Integer
Public Sub Activate(ByVal ind As Integer)
iInd = ind
If Not ld(ind).ZoomLayer Then
ckZoomRange.Value = 0
lblMinZoom.Enabled = False
lblMaxZoom.Enabled = False
lblUnit1.Enabled = False
lblUnit2.Enabled = False
txtMinZoom.Enabled = False
txtMaxZoom.Enabled = False
Else
ckZoomRange.Value = 1
txtMinZoom.Text = ld(ind).ZoomMin
txtMaxZoom.Text = ld(ind).ZoomMax
End If
If ld(ind).Override Then
ckStyleOver.Value = 1
cmdRegionStyle.Enabled = True
cmdLineStyle.Enabled = True
cmdPointStyle.Enabled = True
cmdFontStyle.Enabled = True
Else
ckStyleOver.Value = 0
cmdRegionStyle.Enabled = False
cmdLineStyle.Enabled = False
cmdPointStyle.Enabled = False
cmdFontStyle.Enabled = False
End If
InitUnits
FormToCenter hWnd
Show 1
End Sub
Private Sub ckStyleOver_Click()
If ckStyleOver.Value = 1 Then
cmdRegionStyle.Enabled = True
cmdLineStyle.Enabled = True
cmdPointStyle.Enabled = True
cmdFontStyle.Enabled = True
Else
cmdRegionStyle.Enabled = False
cmdLineStyle.Enabled = False
cmdPointStyle.Enabled = False
cmdFontStyle.Enabled = False
End If
End Sub
Private Sub ckZoomRange_Click()
If ckZoomRange.Value = 1 Then
lblMinZoom.Enabled = True
lblMaxZoom.Enabled = True
lblUnit1.Enabled = True
lblUnit2.Enabled = True
txtMinZoom.Enabled = True
txtMaxZoom.Enabled = True
Else
lblMinZoom.Enabled = False
lblMaxZoom.Enabled = False
lblUnit1.Enabled = False
lblUnit2.Enabled = False
txtMinZoom.Enabled = False
txtMaxZoom.Enabled = False
End If
End Sub
Private Sub InitUnits()
Select Case LayerControl.gMap.MapUnit
Case miUnitFoot
lblUnit1.Caption = "ft."
lblUnit2.Caption = "ft."
Case miUnitKilometer
lblUnit1.Caption = "km."
lblUnit2.Caption = "km."
Case miUnitMeter
lblUnit1.Caption = "m."
lblUnit2.Caption = "m."
Case miUnitMile
lblUnit1.Caption = "mi."
lblUnit2.Caption = "mi."
Case miUnitYard
lblUnit1.Caption = "yd."
lblUnit2.Caption = "yd."
End Select
End Sub
Private Sub cmdCancel_Click()
Hide
End Sub
Private Sub cmdFontStyle_Click()
ld(iInd).StyleProp.PickText
End Sub
Private Sub cmdLineStyle_Click()
ld(iInd).StyleProp.PickLine
End Sub
Private Sub cmdOk_Click()
ld(iInd).StyleChanged = True
ld(iInd).ZoomLayer = (ckZoomRange.Value = 1)
ld(iInd).ZoomMin = Val(txtMinZoom.Text)
ld(iInd).ZoomMax = Val(txtMaxZoom.Text)
ld(iInd).Override = (ckStyleOver.Value = 1)
Hide
End Sub
Private Sub cmdPointStyle_Click()
ld(iInd).StyleProp.PickSymbol
End Sub
Private Sub cmdRegionStyle_Click()
ld(iInd).StyleProp.PickRegion
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -