Simple Mdi Parent and MdiChild Winforms?

I have three forms: 1 - Mdiparent, and the other two - a simple form (Form1 and Form2).

Parent:

var frmForm1 = new Form1{ MdiParent = this};
frmForm1.Show();

Form 1: var MParent = new Parent (); var frmForm2 = new Form2 {MdiParent = MParent}; frmForm2.Show ();

My problem is that if I show Form2 from Form1, it goes beyond MdiParent.

+3
source share
1 answer

I just got a response.

var frmForm2 = new Form2{ MdiParent =This.MParent};
 frmForm2.Show();
+2
source

Source: https://habr.com/ru/post/1772054/


All Articles