bhu1st
bhu1st

Reputation: 1318

C#.Net Panel Control and MDI Child forms - issue

Hi i am stuck in MDIform with panel control.

I have one panel control Docked (fill) to parent MDI form. When i try opening new child form with menu click event the child form doesn't show up in MDI container.

After debugging few times, i set the visible property of panel control to false, the child form shows up now.

what is causing this? is there any way that i can leave panel control as docked (fill) inside MDI container form and show the child form on top of that panel?

Upvotes: 2

Views: 2507

Answers (3)

Daniel Hilgarth
Daniel Hilgarth

Reputation: 174457

It might be, that the panel control is shown in front of the MDI child. Try to move the MDI child to the foreground or the panel to the background.

Upvotes: 0

Venkatesh
Venkatesh

Reputation: 11

After the call to the Show method for the MDI child form, add the childForm.BringToFront() statement. The child form will show in front of the parent form controls.

Upvotes: 1

Hans Passant
Hans Passant

Reputation: 942227

MDI child windows are always shown as a child of the MDI client area. The dark gray window in an MDI parent. You cannot cover this up with a docked panel, the child windows will show behind the panel. Obviously not visible. You must leave room for the client area, a hard requirement.

Upvotes: 3

Related Questions