如何启用可以同时使用的多种形式? [英] How to enable multiple forms that can be used simultaneously?

查看:144
本文介绍了如何启用可以同时使用的多种形式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我从第一个表单中打开一个新表单,在关闭新表单之前,我将无法再使用第一个表单.我需要同时启用两个表单,并且需要彼此通信.任何提示都会有所帮助.

If I open a new form from the first form, I can no longer use the first form until I close the new one. I need two forms enabled at the same time and need to communicate with each other. Any hints would be helpful. Thanks.

推荐答案

在显示新表单时,请使用.Show方法,而不要使用.ShowDialog.
只需注意,您需要确保在显示表单之前先创建该表单的新实例.
Use the .Show method when you are showing the new form instead of .ShowDialog.
Just note that you need to ensure that you create a new instance of the form before you show it.


另请参阅我对表单协作的答案(以及其他答案和讨论):
如何在列表框之间复制所有项目两种形式 [ ^ ].

我建议只使用一种主要形式和最小模态形式.仅使用一种表单即可使用某些选项卡式UI,停靠UI或其他组合.

另请参阅我的建议集:
GUI外观-C#.Net [
See also my answer on form collaboration (also other answers and discussion):
How to copy all the items between listboxes in two forms[^].

I would advice to use just one main form and minimum modal forms. Use some tabbed UI, docking UI or some other combination using just one form.

See also the set of my recommendations here:
GUI Apperance - C#.Net[^].

—SA


这篇关于如何启用可以同时使用的多种形式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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