Problems with the Parent Form in MDI Application

妖精的绣舞 提交于 2019-12-04 06:24:10

问题


i am using Buttons as controls in the Container ( Parent Form ) and when the Child form appears the Controls in the Parent Form ( Button , Picture , label ) appears on the Child form and Cover it and i cant see the child Form do any one know how to prevent this ,, and i don want to make these controls as

Control.Visible=false;

cuz when i minimize the child form i want the user to get the ability to see the Container with all the controls


回答1:


Is the child control another container or a seperate form? If it is another container use whatever the name of the child form and bringtoFront i.e. child.BringToFront(); I think your problem is that you are putting controls in the parent container. They will remain on top of any mdi Child forms that you create. I think the best way for you to handle this is to change their visibility based on the window state of the mdi Child form either by creating a custom event in the Child form or monitoring the window state of the child form in the parent.



来源:https://stackoverflow.com/questions/4129760/problems-with-the-parent-form-in-mdi-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!