DekGenius.com
[ Team LiB ] Previous Section Next Section

MainMenumarshal by reference, disposable

System.Windows.Forms (system.windows.forms.dll)class

A MainMenu is the Menu strip across the top of a Form. You can bind it to a particular form by using the Form.Menu property.

There is an additional typed CloneMenu() method, which allows you to copy the menu structure for reuse elsewhere.

See Menu for more information on menu functionality.

public class MainMenu : Menu {
// Public Constructors
   public MainMenu();
   public MainMenu(MenuItem[ ] items);
// Public Instance Properties
   public virtual RightToLeft RightToLeft{set; get; }
// Public Instance Methods
   public virtual MainMenu CloneMenu();
   public Form GetForm();
   public override string ToString();  // overrides Menu
// Protected Instance Methods
   protected override IntPtr CreateMenuHandle();  // overrides Menu
   protected override void Dispose(bool disposing);  // overrides Menu
}

Hierarchy

System.Object System.MarshalByRefObject System.ComponentModel.Component(System.ComponentModel.IComponen, System.IDisposable) Menu MainMenu

Returned By

Form.{Menu, MergedMenu}, Menu.GetMainMenu(), PrintPreviewDialog.Menu

Passed To

Form.Menu, PrintPreviewDialog.Menu

    [ Team LiB ] Previous Section Next Section