pqy_20一风
路人甲
路人甲
  • 注册日期2004-08-05
  • 发帖数52
  • QQ
  • 铜币418枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1742回复:1

用MapControl控件怎样实现要素的选择??

楼主#
更多 发布于:2004-12-30 22:00
<P>所用语言:______vb__________________(vba,vb,vc等)</P>
<P>所涉及控件:____MapControl___________________</P>
<P>所涉及主题:___________Ao_____________(vba可填写Top ArcObjects:根据Exploring Ao)</P>
<P>具体想实现的功能:___要素选择___________________</P>
<P>备注和注意事项:____当选中某要素时,可高亮度显示;且可连续选择多要素。</P>
<P>                         目前以下代码已可实现划框,但无法选中</P>
<P>所用程序:_</P>
<P><FONT style="BACKGROUND-COLOR: #ffffff" color=#3c3cc4>            </FONT><FONT style="BACKGROUND-COLOR: #ffffff"><FONT color=#0909f7>Set pMapCommand = m_pMapCommandCollection.Item(Tool.Name)
            If Not pMapCommand Is Nothing Then
                If TypeOf pMapCommand Is esriCore.ITool Then
                    If pMapCommand Is FormMain.MapControlMain.CurrentTool Then
                        Tool.Checked = False
                        Set FormMain.MapControlMain.CurrentTool = Nothing
                    Else
                        Tool.Checked = True
                        Set FormMain.MapControlMain.CurrentTool = pMapCommand
                    End If
                End If
            End If
            MapControlMain.Refresh</FONT><FONT color=#74bb44>_________________</FONT></FONT></P>
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15951
  • QQ
  • 铜币25345枚
  • 威望15368点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2004-12-31 10:59
<P>强烈支持楼主的发贴方式!在arcgis83的开发包里有个例子</P>
<P>下面是这个例子的下载地址:</P>
<P>http://arcobjectsonline.esri.com/ArcObjectsOnline/Samples/ArcMap/Selection/Selection%20Dialog/SelectionDialog.zip</P>
<P>不知道你看了没?</P>
<P>Description:

This sample's command button displays a tabbed dialog that allows the user to perform feature selections based on Class, Attribute and Spatial extents. The spatial extents can either be digitized by the user using a number of tools, or extracted from features in the map. </P>
<P>不过需要你转换到mapcontrol</P>
[此贴子已经被作者于2004-12-31 11:00:00编辑过]
GIS麦田守望者,期待与您交流。
举报 回复(0) 喜欢(0)     评分
游客

返回顶部