无法将 MDI 表单放在前面 [英] Trouble bringing an MDI form to the front

查看:39
本文介绍了无法将 MDI 表单放在前面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我在父窗体中有两个 MDI 窗体.

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

每个表单内部都有许多控件,有些甚至是自定义的 Infragistics 控件,例如 UltraPanel.

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.

如果我在表单内部点击,它不会被带到前面.有什么方法可以让我捕获 MDI 表单内任何地方的点击并将其带到前面?

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?

推荐答案

向子窗体添加一个 DoubleClick 事件并设置:

Add a DoubleClick event to the child form and set:

this.WindowState = FormWindowState.Maximized;

这篇关于无法将 MDI 表单放在前面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆