System.Windows.Forms.MainMenu.CloneMenu Method

Creates a new System.Windows.Forms.MainMenu that is a duplicate of the current System.Windows.Forms.MainMenu.

Syntax

public virtual MainMenu CloneMenu ()

Returns

A System.Windows.Forms.MainMenu that represents the cloned menu.

Remarks

You can use this method to create a copy of the menu structure stored in a System.Windows.Forms.MainMenu. You can use this method to reuse the menu structure stored in a System.Windows.Forms.MainMenu as the foundation for a new System.Windows.Forms.MainMenu. For example, if you want to create a menu structure that has the same menu items as an existing System.Windows.Forms.MainMenu but will also have additional System.Windows.Forms.MenuItem objects added to it, you can use the MainMenu.CloneMenu method to create a copy of the original System.Windows.Forms.MainMenu and then add the new System.Windows.Forms.MenuItem objects to the cloned System.Windows.Forms.MainMenu.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0