阅读:1402回复:1
IFeatureselection.selectionchanged
IFeatureselection.selectionchanged<br>Call <strong>SelectionChanged</strong> after modifying SelectionSet to fire update events on the layer.<br><br>我怎么知道这个 event 发生了呢, 是不是要搞个 listener, 有没有 code 可以分享一下, 谢谢<br>
|
|
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
|
|
|