MDI子窗体跑回地面 [英] MDI Child forms run Back ground

查看:78
本文介绍了MDI子窗体跑回地面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个需求,例如我需要根据组合框选择在父窗口中打开4个新的子窗口,这些窗口将被显示.假设当我选择一种形式的组合框具有1,2,3,4之类的选项时,它将显示第一个窗口,并且在执行第一个窗口时将执行的代码无论我需要同时打开第二个窗口.我如何打开所有窗户.我试过了,但是那些在执行完成后就打开了.任何建议如何按照我的要求打开.

问候,
Jeevan.

Hi All,
I have a requirement like i need to open 4 new child windows within a parent window based on the combo box selection those windows will be displayed. Suppose combo box having options like 1,2,3,4 when i select 1 form that it will displayed first window and whatever the code will be executed while executing the first one i need to open simultaneously second one. How can i open all the windows. I have tried but those are opening after completion of execution. Any suggestions how to open as per my requirement.

Regards,
Jeevan.

推荐答案

这里是个主意:谁需要MDI?为什么要折磨自己并吓跑用户?

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

请查看我过去的答案:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages [在WPF中使用MDI窗口的问题 [ ^ ],
MDIContainer提供错误 [如何最大程度地设置子表单,最小化最后一个子表单 [ ^ ].

另请参见:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages [如何在WPF中创建MDI父窗口? [ ^ ].

—SA
Here is the idea: who needs MDI, ever? Why torturing yourself and scaring out 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 my past answers:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^],
Question on using MDI windows in WPF[^],
MDIContainer giving error[^],
How to set child forms maximized, last childform minimized[^].

See also:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^],
How to Create MDI Parent Window in WPF?[^].

—SA


似乎您正在窗体的Load事件中运行一些代码,这些代码都在主UI线程中运行,因此阻止了您的调用.

在单独的线程或BackgroundWorker中的每个表单内运行代码.
It seems you are running some code inside the Load event of the forms, which are all run in the main UI thread and thus blocking your calls.

Run the code inside each of the form in a separate Thread or a BackgroundWorker.


这篇关于MDI子窗体跑回地面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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