MDI menus

  • Thread starter Thread starter Steven Smith
  • Start date Start date
S

Steven Smith

the way I'm undersatnding the MSDN documentation when
creating parent and child forms the main menu for the
child form should not be displayed on the child form
itself but instead be incorporated into the parent forms
main menu, however I just cannot make this work, with the
parents main menu being displayed at all times, I know
this is rather vague but hopefully someone may have
encountered a similar problem at sometime and may be able
to steer me in the right direction.

Parent/Child interaction works as expected in all other
espects so I can only presume that this has been set up
properly

Thanks in advance

Regards steve
 
Hi, if you maximise your MDI Child form, in your MDI Parent Window, the
menu's will automatically merge.

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
 
Steven,
In addition to the other's comments.

Parent & Child form's menus are only merged automatically when you have a
MDI Container form and MDI Child forms. If you have other parent child
windows, such as those in Outlook & Outlook Express, I would not worry about
merging the menus, or I would manually merge the menus, depending on the
requirements for the app.

To create a MDI Container you set the Form.IsMdiContainer property for that
form to True while designing the form. (or you can set it in code later).

A MDI Child form is designed the same, however when you display it you need
to set the Form.MdiParent property to your MDI Container. Its 'easiest' to
have methods in your MDI Container form to display the child, as then you
can use Me to the child's MdiParent property.

For MDI forms the Parent & Child menu's will automatically be merged for the
currently displayed child. Based on the MenuItem.MergeOrder &
MenuItem.MergeType. Be certain to set the MergeOrder & MergeType when
designing your parent & child menus so the two menus are combined correctly.

To manually merge menus you can use the MenuItem.MergeMenu method.

Hope this helps
Jay
 
Back
Top