如何使用MDI窗体 [英] How to work with MDI windows form
本文介绍了如何使用MDI窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨朋友们!
此 my < span class =code-leadattribute>问题:
我正常工作 3 表格 -
1 。 MDIparent
2 。 Child1
3 。 Child2
我 open Child1 和 Child2 来自 MDIparent 但是 不能 open Child2 来自 Child1 或 Child1 来自 Child2 。
什么 做 我做? 此 my code code-leadattribute> set on Child1 。
Child2 cd2 = new Child2 { MdiParent = MDIparent,可见 = true } ;
感谢 你。
解决方案
试试这个,比如从child1打开child2,在child1中:
child2 = new child2();
child2.MdiParent = this.MdiParent;
child2.Show();
Hi friends!
This is my problem:
I'm working with 3 forms -
1. MDIparent
2. Child1
3. Child2
I can open Child1 and Child2 from MDIparent but cannot open Child2 from Child1 or Child1 from Child2.
What do I do? This is my set of codes on Child1.
Child2 cd2 = new Child2 { MdiParent = MDIparent, Visible = true };
Thank you.
解决方案
Try this, say to open child2 from child1, in child1:
child2 = new child2(); child2.MdiParent = this.MdiParent; child2.Show();
However, you may want to read this: MDI vs SDI[^]
这篇关于如何使用MDI窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文