I am developing a custom extension for ArcMAP in Arcgis 10, and would like to display my Custom Toolbar automatically instead of having the user to select it from the customize window. Is this possible?

Further more is it possible to hide the toolbar, when the extension is switched off from the Extensions window?


2 Answers 2


I think this can be done in your implementation of the setter for IExtensionConfig.State. Since this gets called before the doc opens (and before the toolbar collection is initialized) your extension might need to listen to IDocumentEvents.OpenDocument and NewDocument. Accessing IDocument.Toolbars before one of these events has fired can cause problems.


To complement @Kirk's answer, to show and hide the toolbar, you can try using ICommandBar.Dock and use the esriDockToggle constant (64) from the esriDockFlags enumeration to toggle its visibility. Have not tried this myself so if it doesn't work try some of the other constants.

  • While Kirk's answer was helpful, you answer about using ICommandBar.Dock, was what actually what I was looking for. Apr 13, 2012 at 3:34

Your Answer

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

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