Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
XML RSS Feed
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleMake an MDI application combine MDI container menus with child menus in VB .NET
KeywordsMDI, Multiple Document Interface, mergereplace, menus, VB.NET
CategoriesVB.NET, Tips and Tricks, Controls
 
When an MDI child form gets the focus, Visual Basic merges its menus with its parents. By default, the child's menus are added to the parent's.

Instead you can merge some of the MDI container menus with some of the child's menus. In the menus you want to merge, set MergeType = MergeItems.

If you want to merge more than one set of menus, set all of their MergeType properties to MergeItems and give the pairs you want to merge the same MergeOrder values. For example, suppose the MDI container and child forms both have Tools and Options menus. You could set MergeOrder = 0 for both Tools menus and MergeOrder = 1 for both Options menus.

You can also determine the order in which the items are placed in the merged menus. Suppose the MDI container's menu holds the item "Container Tool" and the child's menu holds the item "Child Tool." Normally Visual Basic would add "Child Tool" at the bottom of the combined menu. To make it come first, set MergeOrder = 1 for the "Container Tool" item and set MergeOrder = 0 for the "Child Tool" item.

 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated