如何在C#中设置启动表单 [英] how to setup start up form in C#
本文介绍了如何在C#中设置启动表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在C#中设置启动表单
how to setup start up form in C#
推荐答案
主要应用程序表单是在System.Windows.Forms.Application.Run
中用作自变量的表单.这种形式用作启动形式.
同时,即使使用System.Windows.Forms.Form.Show
或System.Windows.Forms.Form.ShowDialog
启动应用程序,也可以显示某种形式,并且该形式是应用程序的一部分,但主要形式与System.Windows.Forms.Application.Run
中用作参数的形式相同. .这样,启动形式和主要形式可以不同.这个技巧可以用,但是很不寻常.
-SA
Main application form is the one used as the argument inSystem.Windows.Forms.Application.Run
. This form is used as a start-up one.
At the same time, some form can be shown before even starting application usingSystem.Windows.Forms.Form.Show
, orSystem.Windows.Forms.Form.ShowDialog
and be a part of the application, but the main form will be the same as the one used as the argument inSystem.Windows.Forms.Application.Run
. In this way, the start-up form and main form can be different. This trick will work but it is pretty unusual.
—SA
请参见 ^ ].
这篇关于如何在C#中设置启动表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文