阅读:1742回复:1
用MapControl控件怎样实现要素的选择??
<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> |
|
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编辑过]
|
|
|