Do not go to another FORM1 while FORM2 is open

1

Suppose you have two forms, the first form1 is the main screen which gives you an option to open another form, when this form is open, the user can not go to the main form until he closes / closes form2 .

How do I do this?

    
asked by anonymous 24.06.2017 / 22:19

1 answer

1

You can use .ShowDialog ();

Example:

Form2 form=new Form2();
form.ShowDialog();

As long as you do not close the Form2 screen you will not be able to do anything on the Form1 screen

    
24.06.2017 / 22:27