sirc_lizheng
伴读书童
伴读书童
  • 注册日期2004-07-09
  • 发帖数148
  • QQ
  • 铜币495枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1791回复:1

插入数据框,产生的一个小问题,对大家有帮助.

楼主#
更多 发布于:2008-11-21 10:15
<P>'功能:插入数据框<BR>    Dim pGraphicsContainer As IGraphicsContainer<BR>    Dim pMap As IMap<BR>    Dim pMaps As IMaps<BR>    Dim pActiveView As IActiveView<BR>    <BR>    Set pGraphicsContainer = frmmain.PageLayoutControl1.PageLayout<BR>    Set pActiveView = frmmain.PageLayoutControl1.ActiveView<BR>    Set pMap = frmmain.PageLayoutControl1.ActiveView.FocusMap<BR>    <BR>    Dim pMapFrame As IMapFrame<BR>    Dim pMapExt As IEnvelope<BR>    <BR>    Set pMapFrame = New MapFrame<BR>    Set pMapExt = New Envelope<BR>    Set pMapFrame.Map = pMap<BR>    pMapExt.PutCoords 1, 1, 20, 20<BR>    <BR>    Dim pMapElement As IElement<BR>    Dim pGeoExt As IGeometry<BR>    <BR>    Set pMapElement = pMapFrame<BR>    Set pGeoExt = pMapExt<BR>    pMapElement.Geometry = pGeoExt<BR>    <BR>    pGraphicsContainer.AddElement pMapElement, 1<BR>    frmmain.PageLayoutControl1.Refresh<BR>运行结果,会出现两个数据窗口中都带有数据,但是,把Set pMapFrame.Map = pMap去掉,有不行,设置成没有地图也不行,请指教!</P>
<P>不知道用什么方法可以解决这个问题,大家勤思考奥,等待老大解答!</P>
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15945
  • QQ554730525
  • 铜币25337枚
  • 威望15352点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2008-11-28 13:00
你可以写代码直接删除掉一个mapframe,而不是设置地图
举报 回复(0) 喜欢(0)     评分
游客

返回顶部