I’m writing a windows application using VS2010 and C# 4.0. I have a MDI Parent form, and I need to have a “settings panel” at the bottom of it. I used a borderless form for this purpose. But now while the application is running, when I maximize a child form it overlaps the settings panel. How can I avoid that? My settings panel should always be visible and never overlapped by anything else.
Share
Do not use a
Formfor this. You should be using a simplePanel. Follow these simple steps:IsMdiContainertofalse.Panelto your mainFormand dock it to the bottom (or whatever option you prefer, left, right, etc.). This pannel will be your settings panel.IsMdiContainerback totrue.Steps 3 and 4 can be done in any order.
The reason to first set the
IsMdiContainertofalseis to make sure you can dock yourPanelinside the client space of theFormand not to inside client space of theMdiContainercontrol (which is automatically added by the designer when you setIsMdiContainertotruewith it’s docking set toFill). If you were to dock it inside theMdiContainerthePanelwould be hidden by any MdiChild you were to open. Note that you can not interact directly with theMdiContainercontrol in the designer.