Articles and Tutorials

Add or Remove CommandBar MDI Buttons

Author: Mike Palmatier
Platform: Visual Basic 6.0

You can add or remove MDI buttons that control the child windows in a MDI application. The CommandBars.SetFlags method is used to apply one of the flags from the XTPMenuBarFlags enumeration.

Menu bar with the system MDI popup added
article

Menu bar with the minimize MDI button hidden
article

Menu bar with the maximize MDI button hidden
article

Menu bar with the close MDI button hidden
article

Menu bar with the all MDI buttons hidden
article

This sample code illustrates how to add a MDI popup control on the menu bar.

CommandBars(1).SetFlags xtpFlagAddMDISysPopup, 0

This sample code illustrates how to hide all MDI buttons on the menu bar.

CommandBars(1).SetFlags xtpFlagHideMDIButtons, 0

This sample code illustrates how to hide the maximize MDI button on the menu bar.

CommandBars(1).SetFlags xtpFlagHideMaximizeBox, 0

This sample code illustrates how to hide the minimize MDI button on the menu bar.

CommandBars(1).SetFlags xtpFlagHideMinimizeBox, 0

This sample code illustrates how to hide the close MDI button on the menu bar.

CommandBars(1).SetFlags xtpFlagHideClose, 0

Articles and Tutorials