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.

Recommended Answers

All 2 Replies

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:

Application.Run(Form1);

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.

Oh thanks darkagn.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.