Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2007

Tip: Looking for answers? Try searching our database.

Problem with .NET 2.0 MDI menu merging

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Doug Harber - 31 Oct 2007 04:22 GMT
I've got 2 problems trying to get an MDI child form's menus to merge with
its parent's.

First, I created a simple MDI app with 2 forms, just for testing. The parent
form contains a menu with the following items:

&File
 &New
 &Open

The second form contains the following menus:

&File
 &Test

These are created using MenuStrip and ToolStripMenuItem. The menus in the
parent form all have MergeAction/MergeIndex set to Append/-1. On the child
form, the &File menu item is MatchOnly/-1.

What happens is that when the parent form opens a child form, the &Test menu
correctly item shows up on the parent form's &File menu but the &File menu
item is still present on the child form.

So far the documentation has proved incredibly sketchy, even for Microsoft,
so I'm at a loss as to what I'm doing wrong or, perhaps, just failing to do
at all. All the samples I can find are simply concerned with putting merged
menu items at the top level.

The second problem may be an offshoot of the first in that I have a parent
and child form with much more complicated menu structures. When the parent
opens the form, no menu merging appears to take place at all. Unfortunately,
these forms are actually legacy code from .NET 1.1 that I'm porting to .NET
2.0. (Worse, they previously used a third-party menu library that I'm
attempting to replace with .NET 2.0's menus.) So, while I'm concerned about
solving this second problem, it may be an effect of some other code I may
have had to modify along the way. What concerns me chiefly is that even if I
solve this second problem, I'm going to be left with a problem similar to my
first problem.

So, does anyone know what I'm probably doing wrong? I know this kind of
thing must be done all the time so perhaps someone has stumbled across the
same mistake(s) I've probably made.

Thanks for any help,
Doug Harber
Doug Harber - 31 Oct 2007 21:02 GMT
First problem is apparently solved. Apparently you have to make the menu
invisible on the child form. Of course, nothing in the documentation or
samples suggests this (that I could find.)

> I've got 2 problems trying to get an MDI child form's menus to merge with
> its parent's.
[quoted text clipped - 41 lines]
> Thanks for any help,
> Doug Harber

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.