System.Windows.Forms.Menu.CloneMenu Method

Copies the System.Windows.Forms.Menu that is passed as a parameter to the current System.Windows.Forms.Menu.

Syntax

protected void CloneMenu (Menu menuSrc)

Parameters

menuSrc
The System.Windows.Forms.Menu to copy.

Remarks

This method copies the entire list of System.Windows.Forms.MenuItem objects (stored in the System.Windows.Forms.Menu passed in to menuSrc) into the current menu. You can use this method in your derived class to clone System.Windows.Forms.MenuItem objects. They can then be reused by other classes that derive from System.Windows.Forms.Menu, such as System.Windows.Forms.MainMenu, System.Windows.Forms.ContextMenu, and System.Windows.Forms.MenuItem.

Requirements

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