📄 form4.frm
字号:
VERSION 5.00
Begin VB.Form Form4
Caption = "Form4"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 6630
LinkTopic = "Form4"
ScaleHeight = 3090
ScaleWidth = 6630
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "查找"
Height = 495
Left = 4560
TabIndex = 4
Top = 2160
Width = 1335
End
Begin VB.ComboBox Combo3
Height = 300
Left = 3840
TabIndex = 3
Text = "Combo3"
Top = 1080
Width = 1935
End
Begin VB.ComboBox Combo2
Height = 300
Left = 2040
TabIndex = 2
Text = "Combo2"
Top = 1080
Width = 1695
End
Begin VB.ComboBox Combo1
Height = 300
Left = 240
TabIndex = 1
Text = "Combo1"
Top = 1080
Width = 1695
End
Begin VB.Label Label1
Caption = "商业中心查找"
Height = 375
Left = 360
TabIndex = 0
Top = 240
Width = 1455
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Call ListValues
End Sub
Private Sub Command1_Click()
flag = 2
Form1.Map1.Refresh
Form4.Visible = False
End Sub
Private Sub Form_Load()
With Combo1
Dim fldLyr As MapObjects2.Field
For Each fldLyr In Form1.Map1.Layers("public resouce").Records.Fields
If fldLyr.Type < 20 Then
.AddItem fldLyr.name
End If
Next fldLyr
.ListIndex = 0
End With
With Combo2
.AddItem "="
.AddItem "<"
.AddItem ">"
.AddItem "<="
.AddItem ">="
.AddItem "Like"
.ListIndex = 0
End With
Combo3.Text = "<Field Values>"
End Sub
Private Sub ListValues()
Dim recLyr As MapObjects2.Recordset
Dim strName As String
If Len(Combo1.List(Combo1.ListIndex)) > 0 Then
Set recLyr = Form1.Map1.Layers("public resouce").Records
strName = Combo1.List(Combo1.ListIndex)
Combo3.Clear
Do While Not recLyr.EOF
Combo3.AddItem recLyr.Fields(strName).ValueAsString
recLyr.MoveNext
Loop
End If
Combo3.ListIndex = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -