0

First

As you can see in attached screenshot, I open a few form in parent windows form. But if I click another program on my computer, for example Paint, Outlook etc., last opened windows form overlap on new screen. You can see that in second image.

Second

How can I keep all form in parent form borders?

EDIT : I know I should use MDI Parent and I already create main form as a MDI parent form. But last form is not opened from MDI Parent like mentioned in this.

EDIT 2 : Here is the hierarchy;

  • Main MDI Form -- MDI Child Form ---- Form ----- Form 2

I want to keep Form 2 in MDI Container. When I use another program, Form 2 is showing center of the screen :)

Community
  • 1
  • 1
Emre Kadan
  • 41
  • 3
  • 10
  • The main form is *not* a parent form if you don't explicitly specify this when you open a new form. Specify a parent form when you open a new form with `Show()` or `ShowDialog()`, eg `Show(this)`. Without a parent, forms can appear outside the main form and can be overlapped by other applications – Panagiotis Kanavos Oct 06 '16 at 08:04
  • @PanagiotisKanavos Doesn't `ShowDialog(this)` make this the owner, but not the parent? I think he asks for something like MFC's MDI interface - http://www.tenouk.com/visualcplusmfc/visualcplusmfc12mdi_files/image001.png – sashoalm Oct 06 '16 at 08:06
  • 1
    Possible duplicate of [MDI form in C# Parent And Child](http://stackoverflow.com/questions/6076526/mdi-form-in-c-sharp-parent-and-child) – sashoalm Oct 06 '16 at 08:07

0 Answers0