Private Function GetThemeType() As Integer '获得专题图类型 Dim nType As Integer, nIndex As Integer nIndex = Combo1.ListIndex Select Case nIndex Case 0 '范围图 nType = 0 Case 1 '柱状图 nType = 1 Case 2 '饼状图 nType = 2 Case 3 '等级符号图 nType = 3 Case 4 '点密度图 nType = 4 Case 5 '独立值图 nType = 5 Case 6 '自动专题图 nType = 6 Case 7 '标注范围专题图 nType = 7 Case 8 '标注独立值专题图 nType = 8 Case 9 '非专题图 nType = 9 Case Else '提示用户选择专题类型 nType = -1 End Select GetThemeType = nType End Function Private Function GetThemeLayerName() As String '获得专题图层名称 Dim strLayerName As String Dim nIndex As Integer nIndex = Combo2.ListIndex If nIndex < 0 Then strLayerName = Else strLayerName = Combo2.List(nIndex) End If GetThemeLayerName = strLayerName End Function Private Sub Form_Load() Dim i As Integer, nLayerCount As Integer '加载专题图类型 Combo1.AddItem 范围图, 0 Combo1.AddItem 柱状图, 1 Combo1.AddItem 饼状图, 2 Combo1.AddItem 等级符号图, 3 Combo1.AddItem 点密度图, 4 Combo1.AddItem 独立值图, 5 Combo1.AddItem 自动专题图, 6 Combo1.AddItem 标注范围专题图, 7 Combo1.AddItem 标注独立值专题图, 8 Combo1.AddItem 非专题图, 9 '加载图层列表 If Map1.Layers.Count > 0 Then nLayerCount = Map1.Layers.Count For i = 1 To nLayerCount Combo2.AddItem Map1.Layers.Item(i).Name, i - 1 Next End If End Sub(责任编辑:admin) |