0

So, I've got two Winforms. One is in fullscreen and the other one is in the normal size. The second comes over the first. It is something like this:

click here

The problem is, when I click the form in fullscreen, the form that looks like a Message Box will hide. How can I prevent this?

Mong Zhu
  • 23,309
  • 10
  • 44
  • 76

3 Answers3

0

When showing the child window or form you have to use ShowDialog()

Form childForm = new Form();
childForm.ShowDialog(this);

Assuming that childForm is the small window and this is the parent form.

Hussein Salman
  • 7,806
  • 15
  • 60
  • 98
0

As Peter B mentioned in his comment, you'll want to make the new non-fullscreen window a Modal Dialog. This will make the smaller window behave as a dialog box of the bigger one (if the smaller is created from the bigger one). You can use ShowDialog instead of Showas Rand Random suggested.

KinSlayerUY
  • 1,903
  • 17
  • 22
0

Open your normal form like below :

Form f = new Form();
f.ShowDialog(this);
Md. Suman Kabir
  • 5,243
  • 5
  • 25
  • 43