Files
docs-desktop/dotnet-desktop-guide/framework/winforms/controls/how-to-set-up-automatic-menu-merging-for-mdi-applications.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.8 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
How to: Set Up Automatic Menu Merging for MDI Applications 03/30/2017
MenuStrip [Windows Forms], merging
Merging [Windows Forms], automatic menu
55e32cad-1141-4a56-aa33-d9543ca3d393

How to: Set Up Automatic Menu Merging for MDI Applications

The following procedure gives the basic steps for setting up automatic merging in a multiple-document interface (MDI) application with xref:System.Windows.Forms.MenuStrip.

To set up automatic menu merging

  1. Create the MDI parent form by setting its xref:System.Windows.Forms.Form.IsMdiContainer%2A property to true.

  2. Add a xref:System.Windows.Forms.MenuStrip to the MDI parent, setting its xref:System.Windows.Forms.Form.MainMenuStrip%2A property to that xref:System.Windows.Forms.MenuStrip.

  3. Create an MDI child form, and set its xref:System.Windows.Forms.Form.MdiParent%2A property to the name of the parent form.

  4. Add a xref:System.Windows.Forms.MenuStrip to the MDI child form.

  5. On the child form, set the xref:System.Windows.Forms.ToolStripItem.Visible%2A property of the xref:System.Windows.Forms.MenuStrip to false.

  6. Add menu items to the child form's xref:System.Windows.Forms.MenuStrip that you want to merge into the parent form's xref:System.Windows.Forms.MenuStrip when the child form is activated.

  7. Use the xref:System.Windows.Forms.ToolStripItem.MergeAction%2A property on the menu items in the child form's xref:System.Windows.Forms.MenuStrip to control how they merge into the parent form.

See also