Does anybody know how to setup the starting form of a winforms project in Visual Studio 2010? I have ridden to go to Project Properties and change Startup Object, but in dow
It is not only in Program.cs. It is in any class where exists a "static Main()" function. Programs.cs is made for you by the IDE on certain type of project. It's not a must.
Example:
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(new Form2());
}
The project properties, tab: "Application" show a dropdown with every class that as a static Main() function. You could choose the one you want from there.