📄 form2.frm
字号:
VERSION 5.00
Begin VB.Form Form2
Caption = "表达式查找"
ClientHeight = 2550
ClientLeft = 60
ClientTop = 450
ClientWidth = 6510
LinkTopic = "Form2"
ScaleHeight = 2550
ScaleWidth = 6510
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "查找"
Height = 495
Left = 4320
TabIndex = 3
Top = 1560
Width = 1215
End
Begin VB.ComboBox Combo3
Height = 300
Left = 3120
TabIndex = 2
Text = "Combo3"
Top = 840
Width = 2295
End
Begin VB.ComboBox Combo2
Height = 300
Left = 1800
TabIndex = 1
Text = "Combo2"
Top = 840
Width = 1335
End
Begin VB.ComboBox Combo1
Height = 300
Left = 0
TabIndex = 0
Text = "Combo1"
Top = 840
Width = 1815
End
Begin VB.Label Label1
Caption = "名胜古迹查找"
Height = 255
Left = 240
TabIndex = 4
Top = 240
Width = 1335
End
End
Attribute VB_Name = "Form2"
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 = 1
Form1.Map1.Refresh
Form2.Visible = False
End Sub
Private Sub Form_Load()
With Combo1
Dim fldLyr As MapObjects2.Field
For Each fldLyr In Form1.Map1.Layers("famous place").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("famous place").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 + -