If I have 2 Forms in my application and Form1 is my startingForm. Is it possible to make Form2 as my startingForm instead.
What indicates in the code that Form1 is my startingForm.
Is this possible to do ?

Recommended Answers

All 2 Replies

The starting form is the first form that's opened. If you're using code generated by the new project wizard there will be a *.cpp file named the same as your project. That's where main() is, and in main() you'll see something like this:

// Create the main window and run it
Application::Run(gcnew Form1());

Change Form1 to the name of the form you want to be the starting form and that's it! :)

Radical Edward

Thank you for your help. I think I did it :)

The starting form is the first form that's opened. If you're using code generated by the new project wizard there will be a *.cpp file named the same as your project. That's where main() is, and in main() you'll see something like this:

// Create the main window and run it
Application::Run(gcnew Form1());

Change Form1 to the name of the form you want to be the starting form and that's it! :)

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.