Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing startup form in C#

Tags:

I am using visual studio 2010 express but i wonder how can i change startup form when the program runs as i have multiple form within my application. I thought of doing so but i figured out that every form i am creating uses the same namespace. Please help me.

like image 881
Sam Samson Avatar asked Mar 25 '11 14:03

Sam Samson


People also ask

How can I change first form in C#?

Application. Run(new Form1()); This line shows Form1. You can change it to do whatever you want.

How do I change the startup form in Visual Studio 2019?

1) Double-click on My Project under the project in Solution Explorer. 2) Click the Application tab. 3) Set the Startup form.


1 Answers

Look in Program.cs in the Main function for something like this

Application.Run(new MyForm()); 

Change MyForm to your other form.

like image 131
Daniel A. White Avatar answered Sep 20 '22 19:09

Daniel A. White