Problems with parent form in MDI application

I use the buttons as controls in the container (parent form) and when the "Child" form appears, the controls in the parent form (button, image, shortcut) appear in the "Child" and "Cover it" forms, and I do not see the child does anyone know how to prevent this, and I don’t want these controls to be

Control.Visible=false;

Because when I minimize the child form, I want the user to be able to see the Container with all the controls

0
source share
1 answer

Does the child control another container or individual form? If it is a different container, use any name of the child form and give the value totoFront ie child.BringToFront();I think your problem is that you put the controls in the parent container. They will remain on top of any mdi baby forms you create. I believe that the best way to deal with this is to change your visibility based on the state of the mdi Child form window, either by creating a custom event in the child form, or by monitoring the state of the window of the child form in the parent form.

0
source

Source: https://habr.com/ru/post/1787997/


All Articles