in my project i build a parent mdi which contains some labels, text and buttons and also a child mdi. when i run the program initially everything is okkk. but on opening the child mdi , the labels,buttons and text of parent mdi, are also visible on the child mdi. i used the enabled and visible in parent mdi but that close the whole program.
any sugestion plzzzz
The problem you are having is related to how MdiParent forms are handled.
When you set the isMdiContainer property to true it creates an MdiClient control on the form. This control is docked to fill the form and set behind all the other controls.
Whenever you add a child form it is placed inside this control (not on the form as you might expect). So the other controls are kept in front of the child form.
One workaround for this is to loop through all the forms controls at load to find the MdiClient control. You can then unset its docking and resize it. If you put your MdiParent's controls (the labels, textboxes, etc) in an area at the top of the form and size the MdiClient to fill whats left then the child forms will only be able to occupy the unused space.
Generally, if im using an Mdi form the MdiContainer only has a menustrip at the top and status bar at the bottom. Any other controls i want i place in child forms.