?? clearfeatureselection.cls
字號:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "ClearFeatureSelection"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Private m_pHookHelper As esriControlCommands.IHookHelper
Private m_pBitmap As IPictureDisp
Implements esriSystemUI.ICommand
Private Sub Class_Initialize()
Set m_pBitmap = LoadResPicture("ClearSelection", vbResBitmap)
Set m_pHookHelper = New HookHelper
End Sub
Private Sub Class_Terminate()
Set m_pBitmap = Nothing
Set m_pHookHelper = Nothing
End Sub
Private Property Get ICommand_Bitmap() As esriSystem.OLE_HANDLE
ICommand_Bitmap = m_pBitmap
End Property
Private Property Get ICommand_Enabled() As Boolean
If (m_pHookHelper.FocusMap Is Nothing) Then Exit Property
ICommand_Enabled = (m_pHookHelper.FocusMap.SelectionCount > 0)
End Property
Private Property Get ICommand_Checked() As Boolean
ICommand_Checked = False
End Property
Private Property Get ICommand_Name() As String
ICommand_Name = "Sample_Select(VB6)_Clear Feature Selection"
End Property
Private Property Get ICommand_Caption() As String
ICommand_Caption = "Clear Feature Selection"
End Property
Private Property Get ICommand_Tooltip() As String
ICommand_Tooltip = "Clear Feature Selection"
End Property
Private Property Get ICommand_Message() As String
ICommand_Message = "Clear Current Feature Selection"
End Property
Private Property Get ICommand_HelpFile() As String
' Not used
End Property
Private Property Get ICommand_HelpContextID() As Long
' Not used
End Property
Private Property Get ICommand_Category() As String
ICommand_Category = "Sample_Select(VB6)"
End Property
Private Sub ICommand_OnCreate(ByVal hook As Object)
Set m_pHookHelper.hook = hook
End Sub
Private Sub ICommand_OnClick()
'Clear selection
m_pHookHelper.FocusMap.ClearSelection
'Get the IActiveView of the FocusMap
Dim pActiveView As esriCarto.IActiveView
Set pActiveView = m_pHookHelper.FocusMap
'Get the visible extent of the display
Dim pBounds As esriGeometry.IEnvelope
Set pBounds = pActiveView.ScreenDisplay.DisplayTransformation.FittedBounds
'Refresh the visible extent of the display
pActiveView.PartialRefresh esriViewGeoSelection, Nothing, pBounds
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -