一个Windows Forms程序,如果有多个窗体,那么如何设置某一个窗体最先打开?
如下图,该程序有两个窗体Form1和Form2,如何设置Form2最先打开?
方法如下
1、双击【Program.cs】
2、修改代码Application.Run()中内容为Form2即可
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form2());
}
本文由查霆原创,转载需授权。原文地址 http://www.zhating.cn/index.php/post/23.html