Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleMake an MDI application replace 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.

To make some of the child's menus replace some in the MDI container, set the menus' MergeType property to Replace. When Visual Basic merges the menus, it replaces the MDI container's menus with MergeType = Replace with those in the child that have MergeType = Replace.

Sometimes you may want to replace more than one menu with more than one other. For example, the MDI container and the child many both have Orders, Customers, and Tools menus. Set MergeType = Replace for all of the menus. Then to make the child menus replace the corresponding MDI container menus, set each pair's MergeOrder property to the same value. For example, set MergeOrder = 0 for both Orders menus, MergeOrder = 1 for both Customers menus, and MergeOrder = 2 for both Tools menus.

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