Form.IsMdiChild 属性

定义

获取一个值,该值指示窗体是否为多文档界面 (MDI) 子窗体。Gets a value indicating whether the form is a multiple-document interface (MDI) child form.

public:
 property bool IsMdiChild { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool IsMdiChild { get; }
member this.IsMdiChild : bool
Public ReadOnly Property IsMdiChild As Boolean

属性值

如果该窗体是 MDI 子窗体,则为 true;否则,为 falsetrue if the form is an MDI child form; otherwise, false.

属性

注解

在运行时,MDI 子窗体显示在 MDI 父窗体的工作区中。At run time, MDI child forms are displayed inside the client area of an MDI parent form. MDI 子窗体可以在 MDI 父窗体内最大化、最小化和移动。An MDI child form can be maximized, minimized, and moved within the MDI parent form. 若要创建 MDI 子窗体,请将作为 MDI 父窗体的 Form 分配给子窗体的 MdiParent 属性。To create an MDI child form, assign the Form that will be the MDI parent form to the MdiParent property of the child form. 您可以使用 IsMdiContainer 属性来确定窗体是否为 MDI 父窗体。You can use the IsMdiContainer property to determine whether a form is an MDI parent form.

您可以使用 IsMdiChild 属性来确定由方法或属性返回的窗体是应用程序中的 MDI 子窗体还是标准窗体,如对话框。You can use the IsMdiChild property to determine whether a form returned by a method or property is an MDI child form or a standard form in your application such as a dialog box.

备注

所有 MDI 子窗体都具有可调整大小的边框、控件菜单框、最小化和最大化按钮,而与 FormBorderStyleControlBoxMinimizeBoxMaximizeBox 属性的设置无关。All MDI child forms have sizable borders, a control-menu box, and Minimize and Maximize buttons, regardless of the settings of the FormBorderStyle, ControlBox, MinimizeBox, and MaximizeBox properties.

适用于

另请参阅