在你要选定为主窗口的代码中加入:
假设你选定的主窗口是Form1,那么在Form1的代码中加入:
[STAThread]
static void Main()
{
System.Windows.Forms.Application.Run(new Form1());
}然后在项目浏览器中,选中项目,右键属性,在Startup Object中选择Form1
假设你选定的主窗口是Form1,那么在Form1的代码中加入:
[STAThread]
static void Main()
{
System.Windows.Forms.Application.Run(new Form1());
}然后在项目浏览器中,选中项目,右键属性,在Startup Object中选择Form1
static void Main()
{
System.Windows.Forms.Application.Run(new Form1());
}
把Form1()改为你想要的主窗口就行了