I am creating a configurable extension for ArcGIS desktop 10.1

I am not using Add-on , so please don't suggest add-on.

How can I disable some toolbars and commands, when the extension is disabled? I want to disable users from adding toolbars from the "Customize" interface in ArcMap, when the extension is disabled?

Is there a way even to hide the toolbar from the "Customize" interface of GIS desktop when the extension is disabled?


1 Answer 1


Rebecca Zeckoski goes into detail in her blog post titled Capturing Button Clicks in ArcObjects. The following is an (untested) adaptation of her code.

Public Class clsCustomizationFilter
  Implements ESRI.ArcGIS.Framework.ICustomizationFilter

  Public Function OnCustomizationEvent(custEventType As _
   ESRI.ArcGIS.Framework.esriCustomizationEvent, eventCtx As Object) As Boolean _
   Implements ESRI.ArcGIS.Framework.ICustomizationFilter.OnCustomizationEvent

   If custEventType = ESRI.ArcGIS.Framework.esriCustomizationEvent.esriCEShowCustDlg Then
        Return False
   End If

   Return True

End Function

Apply the filter to the app:

m_Filter = New clsCustomizationFilter
My.ArcMap.Application.LockCustomization("password", m_Filter)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.