|
Support
ActiveX / COM
Visual C++ / MFC
Customer Spotlight
Corporate Partners
Contact Sales
Call center available M-F 9:00 - 6:00 US Eastern Time. U.S. and Canada International Email |
Removing ToolBars from the Context Menu
Author: Mike Palmatier
Posted: February 7, 2006
Environment: Visual Basic 6.0
When you right-click on any area of the CommandBars a Context Menu is displayed with the name of all the ToolBars that have been added. This menu allows
you to hide or display a toolbar. By default, all ToolBars are added to this menu. To remove a ToolBar from the menu, set the CommandBars.ContextMenuPresent
property to False.
To completely remove the Context Menu, you need to remove the entry for ToolBars.
CommandBars(2).ContextMenuPresent = False
The code below will remove all toolbars from the ContextMenu, which will in effect "disable" the menu. This is useful when you want to display your own context menu instead of the standard one. Private Sub CommandBars_ToolBarContextMenu(ByVal ToolBar As XtremeCommandBars.ICommandBar, ByVal ContextMenu As XtremeCommandBars.ICommandBar) ContextMenu.Controls.DeleteAll End Sub |
