* 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
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 |
|
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
-
Create the MDI parent form by setting its xref:System.Windows.Forms.Form.IsMdiContainer%2A property to
true. -
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.
-
Create an MDI child form, and set its xref:System.Windows.Forms.Form.MdiParent%2A property to the name of the parent form.
-
Add a xref:System.Windows.Forms.MenuStrip to the MDI child form.
-
On the child form, set the xref:System.Windows.Forms.ToolStripItem.Visible%2A property of the xref:System.Windows.Forms.MenuStrip to
false. -
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.
-
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.