Guides & Tutorials (beta)

Removing ToolBars from the Context Menu

by Mike Palmatier Visual Basic 6 Created on 02/07/2008  |  Updated on 07/30/2024 0/5 ( 0 votes )

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.

Toolbar Context Menu

The code below will remove the first toolbar from the ContextMenu.

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

User Comments

No comments yet, sign in to comment.

Secure Transactions

Online transactions are secure and protected.


Ssl seal 1
This site is protected by Trustwave's Trusted Commerce program
CompliAssure Secured

Money Back Guarantee

If you are not 100% happy with your purchase within 30 days, you can return it for any reason. Your satisfaction is our priority!


Satisfication Guarantee

Contact sales@codejock.com for more details.