Controls in container form come over child form?

haansi picture haansi · Jan 26, 2011 · Viewed 10k times · Source

In a container form I have menu and buttons to open ther forms. enter image description here

Here I am facing a problem when I open any form these buttns and lables come over newly opened form. enter image description here

Please guide me how I can manage this issue? I want to open a new form and keep these container form's controls in back ground of it.

Answer

Anaya Upadhyay picture Anaya Upadhyay · Feb 22, 2012

I've also got the same problem. I got an alternative solution as described below:

  1. Insert a timer control
  2. I've added the controls in a panel container
  3. And did the following

    private void timer1_Tick(object sender, EventArgs e)
    {
        if ((int)MdiChildren.GetLength(0) > 0)
        {
            panel1.Visible = false;
        }
        else
        {
            panel1.Visible = true;
        }
    }