Mdi Form
-
In a container form I have menu and buttons to open their forms.
Here I am facing a problem when I open any form these buttons and lables come over newly opened form.
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.
-
In a container form I have menu and buttons to open their forms.
Here I am facing a problem when I open any form these buttons and lables come over newly opened form.
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.
-
In a container form I have menu and buttons to open their forms.
Here I am facing a problem when I open any form these buttons and lables come over newly opened form.
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.
This happens because you put controls in the client area of the MdiParent form (the darker area of the form). You cannot do that unless you either want those controls to be over the top of all of your MdiChild forms or you have to resize the MdiClient control that's on the MdiParent form. The problem is, you can't do that are designtime. It has to be done as runtime. You have to iterate through the MdiParent forms Controls collection, looking for a control of Type MdiClient, then you can set its Dock property to False and resize it to what you need to make room for your controls, and lastly set it the Anchor property appropriately to maintain that layout.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak