Form2 form2 = new Form2();
form2.Show();
this.Hide();
I want this code to show form 2 and hide form1, but so that if I close form 2 (click on the X), the whole program stops running. As it is, it keeps running, and I assume this is because some forms are only hidden, not closed. But I tried:
Form2 form2 = new Form2();
form2.Open();
this.Close();
but that didnt seem to make any difference. I google'd it, and it said to go to tools > options > Debugging > Break all processes when one process breaks. This sounds like not what I want, and it mustn't be, cos it didnt work. Can someone please tell me how to navigate between forms so that if I close the visible one, the whole program stops running, and I can edit my code straight away without having to press stop every time?

New Topic/Question
Reply


MultiQuote









|