How do I overlay this container?

sshers1

New member
Joined
Mar 14, 2016
Messages
4
Programming Experience
Beginner
Can anyone tell me how I can over lay this big container so no objects can cover it?



Untitled.png
 
Your explanation is very poor. Please strive to provide a FULL and CLEAR explanation of the problem. Assume that too many words is better than not enough. Explain exactly what you're trying to do, exactly how you're trying to do it and exactly how the result differs from your expectations.

That said, it appears that your issue stems from alack of understanding of how MDI works and that what you want to do is not possible. When you set the IsMdiContainer property of a form to true, the background of that form turns grey, right? Wrong. The background of the form doesn't change at all. What actually happens is that an MdiClient control is added to the form and it's the background of that control that is grey. This MdiClient is treated a bit differently to other controls and it also has some special behaviour. One of those behaviours is that is cannot contain any child controls other than forms. Each MDI child form is actually a control whose Parent is the MdiClient.

Now, if you add any other controls to the parent form, they are siblings of the MdiClient, i.e. those controls are not on the MdiClient but rather on the form with the MdiClient. As such, the z-order will determine whether those controls can be seen in font of the MdiClient or are hidden behind it. If they are in front of the MdiClient then they are also in front of any children the MdiClient contains, i.e. they are in front of any MDI child forms. If you add controls to a MDI parent form, they cannot be between the MdiClient and the child forms. They are either hidden behind the MdiClient altogether or they are shown in front of the MDI child forms.

All hope is not lost though. What you can do is not let the MdiClient occupy the entire parent form and leave some space for child controls. You can do that by adding a Panel to the parent form and setting its Dock property to one of the edges. What that will do is push the Panel to one edge and the MdiClient will then only occupy the remaining area. You can then add child controls to that Panel.
 
Back
Top Bottom