Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup the starting form of a winforms project in Visual Studio 2010

Tags:

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 dowpdownlist the only options available were "(None)" and "ProjectName.Program.cs". The "program.cs" is my default code file. Please help me. (Im working in C#)

like image 491
FrewCen Avatar asked Aug 08 '11 10:08

FrewCen


People also ask

How do you set the starting from the first form to be displayed after running application of the project?

Go to 'Tools' and click on 'Options'. Next, go on the 'Startup' option within the 'Environment' category, and select 'Show Start Page' from the drop down menu.


2 Answers

In your Program.cs, there is line like:

Application.Run(new Form1()); 

where you can substitute the form you'd like to start. If you change Form1 to another Form class, your project will start with that one.

like image 63
henginy Avatar answered Sep 21 '22 15:09

henginy


in visual studio on the menu bar: project > project properties > start up form : select the form within your project that you want to run on start up.

like image 39
Francisco Cortes Avatar answered Sep 24 '22 15:09

Francisco Cortes