gis_cn
路人甲
路人甲
  • 注册日期2006-07-02
  • 发帖数10
  • QQ
  • 铜币164枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1403回复:1

IFeatureselection.selectionchanged

楼主#
更多 发布于:2007-07-16 15:19
IFeatureselection.selectionchanged<br>Call <strong>SelectionChanged</strong> after modifying SelectionSet to fire update events on the layer.<br><br>我怎么知道这个 event 发生了呢, 是不是要搞个 listener, 有没有 code 可以分享一下, 谢谢<br>
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15951
  • QQ
  • 铜币25345枚
  • 威望15368点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2007-07-19 15:16
Option Explicit<BR>''This is where I declare the event properties<BR>Private WithEvents m_pActiveViewEvents As Map<BR>Dim pMxApp As IMxApplication<BR>Dim pMap As IMap<BR>Dim pMxDoc As IMxDocument<BR><BR><BR>Private Function MxDocument_OpenDocument() As Boolean<BR>  Set pMxApp = Application<BR>  Set pMxDoc = Application.Document<BR>  Set pMap = pMxDoc.FocusMap<BR>  Set pActiveViewEvents = pMap<BR>End Function<BR><BR>'''This is what is supposed to fire when<BR>''' the selection has been changed on the focusmap<BR><BR>Private Sub pActiveViewEvents_SelectionChanged()<BR>    Set pMxDoc = ThisDocument<BR>    Set pMap = pMxDoc.FocusMap<BR>    MsgBox pMap.SelectionCount_; "features_selected"<BR>    frmFragatva.Show vbModeless<BR> End Sub
GIS麦田守望者,期待与您交流。
举报 回复(0) 喜欢(0)     评分
游客

返回顶部