如何从一个mdichild转到另一个mdichild,所有这些都在同一个mdicontainer中打开 [英] How to go from one mdichild to other mdichild and all these open in same mdicontainer

查看:122
本文介绍了如何从一个mdichild转到另一个mdichild,所有这些都在同一个mdicontainer中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

"form1是一个mdiContainer,form2在form1中打开.我想从MdiParent为form1的form2移到form3."

"form1 is a mdiContainer and form2 is open in the form1. i want to move from form2 to form3 whose MdiParent is form1."

private void button1_Click(object sender, EventArgs e)
       {
Form3 fm3 = new Form3();//Error: Form that was specified to be the MdiParent for 
fm3.MdiParent = this;   //this form is no an Mdicontainer.
fm3.Show();             //How can remove this error.
       }

推荐答案

从Form2移到Form3"?这意味着什么?显示Form3 ??

从哪种形式的代码?您以哪种形式发布的代码?
"Move from Form2 to Form3"?? What does that mean? Showing Form3??

From what code in which form? In which form is the code you posted??


这里是个主意:谁曾经需要MDI?为什么要折磨自己并吓users用户?
帮自己一个忙:完全不要使用MDI.没有设计,您可以更轻松地实现设计,并且质量更高.即使Microsoft也不鼓励使用MDI,实际上,Microsoft已将其从WPF中删除,并且几乎不支持它.更重要的是,如果您使用MDI,则会吓跑所有用户.只是不要.我可以解释该怎么办.

请参阅:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages [在WPF中使用MDI窗口的问题 [ ^ ],
MDIContainer提供错误 [如何在WPF中创建MDI父窗口? [ ^ ] — 韦恩·盖拉德(Wayne Gaylard).


—SA
Here is the idea: who needs MDI, ever? Why torturing yourself and scaring off your users?
Do yourself a great favor: do not use MDI at all. You can do much easier to implement design without it, with much better quality. MDI is highly discouraged even by Microsoft, in fact, Microsoft dropped it out of WPF and will hardly support it. More importantly, you will scare off all your users if you use MDI. Just don''t. I can explain what to do instead.

Please see:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^] — Wikipedia,
Question on using MDI windows in WPF[^],
MDIContainer giving error[^] — SA,
How to Create MDI Parent Window in WPF?[^] — Wayne Gaylard.


—SA


如今,带标签的界面日渐普遍.
此CodeProject文章可能对您有所帮助.

类似于Visual Studio 2005的界面 [
Now a days tabbed interface has become common.
This CodeProject article may be helpful to you.

A Visual Studio 2005-like Interface[^]


这篇关于如何从一个mdichild转到另一个mdichild,所有这些都在同一个mdicontainer中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆