📄 form5.frm
字号:
VERSION 5.00
Begin VB.Form Form5
Caption = "Form5"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 7110
LinkTopic = "Form5"
ScaleHeight = 3090
ScaleWidth = 7110
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "查找"
Height = 615
Left = 4680
TabIndex = 4
Top = 1920
Width = 1695
End
Begin VB.ComboBox Combo3
Height = 300
Left = 4320
TabIndex = 3
Text = "Combo3"
Top = 1200
Width = 2415
End
Begin VB.ComboBox Combo2
Height = 300
Left = 2880
TabIndex = 2
Text = "Combo2"
Top = 1200
Width = 1335
End
Begin VB.ComboBox Combo1
Height = 300
Left = 120
TabIndex = 1
Text = "Combo1"
Top = 1200
Width = 2655
End
Begin VB.Label Label1
Caption = "城市市区交通网络查找"
Height = 375
Left = 240
TabIndex = 0
Top = 240
Width = 1935
End
End
Attribute VB_Name = "Form5"
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 = 3
Form1.Map1.Refresh
Form5.Visible = False
End Sub
Private Sub Form_Load()
With Combo1
Dim fldLyr As MapObjects2.Field
For Each fldLyr In Form1.Map1.Layers("network").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("network").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 + -