Search code examples
c#formsdefault

How to set form2 as default?


i want to set form2 as default. My program starts with Form1.cs and i want that he going start with form2.cs This is form1, what i have to do ?

 public partial class Form1 : Form
{

    public Form1()
    {
        InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {
     MessageBox.Show("Form1");
    }

And this is Form2

public partial class settings : Form
{
    public settings()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        MessageBox.Show("'Reported'");
    }

}

}


Solution

  • In the Program.cs file of your application, modify the starting point (Main method) like this :

    Step 1:

    Step 1

    Step 2:

    Step 2