I'm bit new to C#. I just want to change the start up form in my project. (This is a windows form application). There is a field named with STARTUP OBJECT and a dropdownlist in Project properties. But my problem is I have created few forms in my project and those forms are not loaded to above mention dropdown list. (It is loaded 2 items which are "not set" and "MyProject.program") Due to that, I couldn't be able to change a startup form. Please show me a direction.

5 Years
Discussion Span
Last Post by weeraa

You will have a file called Program.cs. This is the execution entry point of your application - or more specifically, the static method called Main in this file is. In this method, one of the last lines of the Main method reads something like:


Change Form1 (or whatever form it actually reads in your file) to be the type of form you want displayed as the first view of your application.

Edited by darkagn

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.