omicito omicito - 1 month ago 5x
C# Question

C# when opening new form, old one has to stop

I have new form opening when button is clicked, like this:

private void button8_Click(object sender, EventArgs e)
Form2 form2 = new Form2();
//more code

Does this mean that, when i click Button8, form2 will be opened, but code after form2.ShowDialog() will not be executed until i close form2?

If this is not the way how to do that, please, can you tell me.


Use Show(); not ShowDialog(); That should works.