Q:

Panel Could not set Visible True in MDI

I am using C#. Net Windows application.
I have one MDI parent form and many child forms. I put panel in MDI parent form and drag several button inside panel.
When I click the button they open another child form and set visible false to panel
like this (sample code):
private void Button_Click(object sender, EventArgs e)
{
    panel1.Visible = false;

    ChildForm Form2 = new ChildForm();
    Form2.WindowState = FormWindowState.Maximized;           
    Form2.Show();
}

Now they perfectly working. What the problem is, when I close the child form the panel could not visible in MDI parent form. Its always panel visible false. I set to true., see my code.
private void ChildForm _FormClosed(object sender, FormClosedEventArgs e)
{
     this.Dispose();
     MDI md = new MDI();
     md.panel1.Visible = true;
}

am also using BringToFront, SendToBack. No use. Please assist.

A:

hi friends i Solved this and i got worked now...
here the Solution..
>  private void ChildForm_FormClosed(object sender,FormClosedEventArgs e)
>         {
>             MDI md = (MDI)this.MdiParent;
>             md.panel1.Visible = true;
>         }

