📄 layervisible.frm
字号:
VERSION 5.00
Begin VB.Form Form2
Caption = "图层可见"
ClientHeight = 3060
ClientLeft = 60
ClientTop = 345
ClientWidth = 3375
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3060
ScaleWidth = 3375
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command4
Caption = "可见"
Height = 495
Left = 2160
TabIndex = 5
Top = 720
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "不可见"
Height = 495
Left = 2160
TabIndex = 4
Top = 1320
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "全部可见"
Height = 495
Left = 2160
TabIndex = 3
Top = 1920
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "全部不可见"
Height = 495
Left = 2160
TabIndex = 2
Top = 2520
Width = 1215
End
Begin VB.ListBox List1
Height = 2580
Left = 0
TabIndex = 1
Top = 360
Width = 2055
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "请选择一个图层:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 0
TabIndex = 0
Top = 0
Width = 1920
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim X As Integer
For X = 1 To Formmain.Map1.Layers.Count
Formmain.Map1.Layers(X).Visible = False
Next
Unload Me
End Sub
Private Sub Command2_Click()
Dim X As Integer
For X = 1 To Formmain.Map1.Layers.Count
Formmain.Map1.Layers(X).Visible = True
Next
Unload Me
End Sub
Private Sub Command3_Click()
Dim selectedlayer As Integer
selectedlayer = List1.ListIndex
If selectedlayer = -1 Then
MsgBox "没有选择任何图层", , "提示"
Exit Sub
End If
Formmain.Map1.Layers(selectedlayer + 1).Visible = False
List1.Clear
Dim X As Integer
For X = 1 To Formmain.Map1.Layers.Count
List1.AddItem Formmain.Map1.Layers(X).Name
Next
End Sub
Private Sub Command4_Click()
Dim selectedlayer As Integer
selectedlayer = List1.ListIndex
If selectedlayer = -1 Then
MsgBox "没有选择任何图层", , "提示"
Exit Sub
End If
Formmain.Map1.Layers(selectedlayer + 1).Visible = True
List1.Clear
Dim X As Integer
For X = 1 To Formmain.Map1.Layers.Count
List1.AddItem Formmain.Map1.Layers(X).Name
Next
End Sub
Private Sub Form_Load()
List1.Clear
Dim X As Integer
For X = 1 To Formmain.Map1.Layers.Count
List1.AddItem Formmain.Map1.Layers(X).Name
Next
End Sub
Private Sub Form_Deactivate()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -