如何在C#中打开多个表单 [英] how to open multiple forms in C#

查看:65
本文介绍了如何在C#中打开多个表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



Iam使用C#Windows应用程序.

我一次不能打开多个表格.
那么你能告诉我如何一次打开多个表格吗?

问候
Nirmala Saravanan



Iam using C# windows application.

I cannot open more than one form at a time.
So can u please tell me how i can open more than one forms at a time

Regards
Nirmala Saravanan

推荐答案

不要使用Form.ShowDialog-在关闭表单之前它不会返回. 改用Form.Show-它立即返回,并且异步创建和显示表单.
Don''t use Form.ShowDialog - it does not return until the form is closed.
Use Form.Show instead - it returns immediately, and the form is created and displayed asynchronously.
MyForm f1 = new MyForm();
f1.Show();
MyForm f2 = new myForm();
f2.Show();



[edit]错别字-虚假的"3"已删除-OriginalGriff [/edit]



[edit]Typo - spurious ''3'' removed - OriginalGriff[/edit]


感谢

我已经解决了自己.

就像使用
一样
thanks

I have solved myself.

the same way like instead of using
Form1.ShowDialog();


我用过


i used

Form1.Show();



有效



it works


谢谢

我已经解决了自己.

就像使用
一样
thanks

I have solved myself.

the same way like instead of using
Form1.ShowDialog();


我用过


i used

Form1.Show();



有效



it works


这篇关于如何在C#中打开多个表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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