阅读:1535回复:1
AE开发求助
<P>我想把axmapcontrol中显示的图层全部删除,代码如下:出现问题是The specified index is out of range。specified index 应该是i.请问怎么修改啊?哪的毛病</P>
<P>private void deletealllayer_Click(object sender, System.EventArgs e)//删除所有文档-----有错误<BR> {<BR> <BR> int Count=axMapControl1.LayerCount;<BR> int i;<BR> for(i=Count;i>0;i--)<BR> {<BR> axMapControl1.DeleteLayer(i);<BR> }<BR> }</P> |
|
1楼#
发布于:2007-09-14 11:57
使用 IMapControlDefault.ClearLayers Method更快了
|
|
|