PrintPreviewDialog.Menu 属性

定义

获取或设置在窗体中显示的 MainMenuGets or sets the MainMenu that is displayed in the form.

public:
 property System::Windows::Forms::MainMenu ^ Menu { System::Windows::Forms::MainMenu ^ get(); void set(System::Windows::Forms::MainMenu ^ value); };
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.MainMenu Menu { get; set; }
member this.Menu : System.Windows.Forms.MainMenu with get, set
Public Property Menu As MainMenu

属性值

MainMenu,表示要在窗体中显示的菜单。A MainMenu that represents the menu to display in the form.

属性

注解

此属性与此类无关。This property is not relevant for this class.

您可以使用此属性在运行时在整个菜单集之间切换。You can use this property to switch between complete menu sets at run time. 例如,你可以定义一个 MainMenu,当多文档界面(MDI)窗体没有活动的 MDI 子窗体并且在显示子窗口时要显示另一个 MainMenu 时,将显示一个。For example, you can define one MainMenu to be displayed when your multiple document interface (MDI) form has no active MDI child forms and another MainMenu to display when a child window is displayed. 如果需要在应用程序中显示不同的菜单集的特定条件,还可以使用不同的 MainMenuYou can also use a different MainMenu when specific conditions that require displaying a different menu set exist in your application.

适用于