本文介绍了f2.MdiParent = this.ParentForm和f2.MdiParent = this.MdiParent有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,代码位于子窗体内,f2也是子窗体。

For example, the code is inside a child form, and f2 is also a child form.

f2.MdiParent = this之间有什么区别。 ParentForm  和
f2.MdiParent = this.MdiParent ? 

What is the difference between f2.MdiParent = this.ParentForm  andf2.MdiParent = this.MdiParent

谢谢。

推荐答案

ParentForm : 容器的表单控制分配给。如果控件托管在Internet Explorer内部或在没有父窗体的其他托管环境中,则此属性将返回null。

ParentForm: The Form that the container control is assigned to. This property will return null if the control is hosted inside of Internet Explorer or in another hosting context where there is no parent form.

MdiParent :获取或设置此表单的当前多文档界面(MDI)父表单。

MdiParent: Gets or sets the current multiple-document interface (MDI) parent form of this form.


这篇关于f2.MdiParent = this.ParentForm和f2.MdiParent = this.MdiParent有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 02:01