Trouble bringing an MDI form to the front

*爱你&永不变心* 提交于 2019-12-11 13:51:44

问题


Imagine I have two MDI forms inside of a parent form.

Each form has many many controls inside, some are even custom Infragistics controls such as an UltraPanel.

Currently when both forms are open and in normal sized mode (not maximize or minimized), I can only bring one form to the front of the other by clicking on the forms title bar.

If I click inside the form itself, it's not brought to the front. Is there some way for me to capture the click anywhere inside the MDI form and bring that one to the front?


回答1:


Add a DoubleClick event to the child form and set:

this.WindowState = FormWindowState.Maximized;


来源:https://stackoverflow.com/questions/6762418/trouble-bringing-an-mdi-form-to-the-front

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