locked
How to choose what debug should open. (Visual C#) RRS feed

  • Question

  • When I click debug it automatically opens Form1.cs [Design]. But I want it to open Form2.cs [Design] instead. Tried looking at Options and Setting at the debug tab but didn't see anything that could help me there. Does anyone know how to do this or do I have to take the contents of them both and switch them?
    • Moved by Kristin Xie Monday, September 14, 2015 7:26 AM winform related
    Sunday, September 13, 2015 6:07 PM

Answers

  • I think what you mean is that when you start your program you want it to show Form2 instead of Form1.  You can do this by modifying your program.cs file and change one line below:

    from...

    Application.Run( new Form1() );

    to...

    Application.Run( new Form2() );


    • Marked as answer by Percutient Monday, September 14, 2015 8:02 PM
    Sunday, September 13, 2015 7:54 PM

All replies

  • I think what you mean is that when you start your program you want it to show Form2 instead of Form1.  You can do this by modifying your program.cs file and change one line below:

    from...

    Application.Run( new Form1() );

    to...

    Application.Run( new Form2() );


    • Marked as answer by Percutient Monday, September 14, 2015 8:02 PM
    Sunday, September 13, 2015 7:54 PM
  • Hi Percutient,

    Your question is more related to Windows Forms. We have moved your thread to Windows Forms > Windows Forms General forum, you will get more help there.

    Best Regards,
    Li Wang

    Monday, September 14, 2015 7:42 AM