Edytuj

Udostępnij za pośrednictwem


Form.MergedMenu Property

Definition

Caution

MainMenu is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use MenuStrip instead.

Gets the merged menu for the form.

public:
 property System::Windows::Forms::MainMenu ^ MergedMenu { System::Windows::Forms::MainMenu ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.MainMenu MergedMenu { get; }
[System.ComponentModel.Browsable(false)]
[System.Obsolete("`MainMenu` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `MenuStrip` instead.", false, DiagnosticId="WFDEV006", UrlFormat="https://aka.ms/winforms-warnings/{0}")]
public System.Windows.Forms.MainMenu MergedMenu { get; }
[<System.ComponentModel.Browsable(false)>]
member this.MergedMenu : System.Windows.Forms.MainMenu
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("`MainMenu` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `MenuStrip` instead.", false, DiagnosticId="WFDEV006", UrlFormat="https://aka.ms/winforms-warnings/{0}")>]
member this.MergedMenu : System.Windows.Forms.MainMenu
Public ReadOnly Property MergedMenu As MainMenu

Property Value

A MainMenu that represents the merged menu of the form.

Attributes

Remarks

This property is primarily used when the form is a multiple-document interface (MDI) child form that merges its menu with its parent form's menu. You can use this property to obtain the current menu structure in an MDI application to make changes or additions to the menu structure. To obtain the nonmerged MainMenu assigned to a form, use the Menu property.

Applies to

See also