The GIS Professional Group

再描画を中断させない方法

2016/9/1 (木)

'VBA
'ArcMap に対してレイヤーの描画のキャンセルは不可と思われる。
'PanMoveTo, PanStart - Stop に対する CancelTracker 
Sub TrackCancel()
    Dim pMxDocument As IMxDocument
    Set pMxDocument = ThisDocument
    
    Dim pActiveView As IActiveView
    Set pActiveView = pMxDocument.FocusMap
    
    Dim pScreenDisplay As IScreenDisplay
    Set pScreenDisplay = pActiveView.ScreenDisplay
    
    Dim pTrackCancel As ITrackCancel
    Set pTrackCancel = New CancelTracker
    pTrackCancel.CancelOnClick = False
    pTrackCancel.CancelOnKeyPress = False
    
    Set pScreenDisplay.CancelTracker = pTrackCancel

End Sub
//MapControl
ITrackCancel pTrackCancel = new CancelTrackerClass(); 
pTrackCancel.CancelOnClick = false;
pTrackCancel.CancelOnKeyPress = false;
axMapControl1.TrackCancel = pTrackCancel;
  • B!