控制MDI容器表单内部 [英] Controls inside MDI container form

查看:84
本文介绍了控制MDI容器表单内部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MDI表单,我在其中放了一些控件。但是当我打开任何MDI子窗体时,控件出现在子窗体的前面。如何发回控件?

解决方案

你做不到。



有办法实现



运行时创建面板在该面板中添加您的表单,然后在MDI中添加该面板



表示运行时



MDI - >面板 - > YourForm



 form1 frm1 =  new  form1(); 
面板p = 面板();
p.controls。 add (frm1);
MDIFrm.Controls.Add(p);
p.Bringtofront();



Happy Coding!

:)


First所有请看我对这个问题的评论。你现在能看到你的问题有多奇怪,至少可以说吗?



这是一个想法:谁需要MDI?为什么要折磨自己并吓跑你的用户?

帮自己一个大忙:根本不要使用MDI。没有它,您可以更轻松地实现设计,质量更好。 MDI甚至被微软高度劝阻,事实上,微软将其从WPF中删除并且很难支持它。更重要的是,如果您使用MDI,您将吓跑所有用户。只是不要。请参阅:

http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages [ ^ ],

如何在WPF中创建MDI父窗口? [ ^ ]。



我可以解释做什么。请看我过去的答案:

如何在WPF中创建MDI父窗口? [解决方案2 ],

关于在WPF中使用MDI窗口的问题 [ ^ ],

麦当劳给出错误 [ ^ ],

如何设置子窗体最大化,最后一个子窗体最小化 [ ^ ]。



-SA

I have an MDI form and I''ve put some controls inside it. But when I open any MDI child forms, the controls appear in front of child form. How to send the controls back?

解决方案

you can not do that.

there is a way to achieve

runtime create panel add your form in that panel and then add that panel in MDI

means Runtime

MDI -> Panel -> YourForm

form1 frm1 = new form1();
panel p = new panel();
p.controls.add(frm1);
MDIFrm.Controls.Add(p);
p.Bringtofront();


Happy Coding!
:)


First of all please see my comment to the question. Can you see now how weird your question is, to say the least?

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. Please see:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^],
How to Create MDI Parent Window in WPF?[^].

I can explain what to do instead. Please see my past answers:
How to Create MDI Parent Window in WPF? [Solution 2],
Question on using MDI windows in WPF[^],
MDIContainer giving error[^],
How to set child forms maximized, last childform minimized[^].

—SA


这篇关于控制MDI容器表单内部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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