---
title: "How to: Set Up Automatic Menu Merging for MDI Applications"
ms.date: "03/30/2017"
helpviewer_keywords: 
  - "MenuStrip [Windows Forms], merging"
  - "Merging [Windows Forms], automatic menu"
ms.assetid: 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

- <xref:System.Windows.Forms.MenuStrip>
- <xref:System.Windows.Forms.ToolStripMenuItem>
- [MenuStrip Control Overview](menustrip-control-overview-windows-forms.md)
