MDI Child forms overlapped with MDI Parent form controls

Viewed 957

I have a MDI Parent form which contains a panel. The panel includes charts and a some other user information's. When I open a form from menu, the newly opened form is shown under the MDI parent panel. How can I show the child form above of all MDI Parent control's. I'm using the below code for opening the form.

SalesInvoice sale = new SalesInvoice();
sale.MdiParent = this;
sale.Show();

enter image description here

2 Answers

First, in your child form properties, in FormBorderStyle property, choose (None).

Second, replace your code to show your child form to this:

Sale.StartPosition = FormStartPosition.Manual
Sale.Left = 200
Sale.Top = 115
Sale.MdiParent = Me
Sale.Show()

you could change (200) and (115) to your desired directions.

You can make the form maximize when you show the form.

Please refer to the following code.

private void button1_Click(object sender, EventArgs e)
        {
            SalesInvoice sale = new SalesInvoice();
            sale.MdiParent = this;
            sale.Show();
            sale.WindowState = FormWindowState.Maximized;
        }
Related