如何将儿童表格带到最前面? [英] How can I bring child forms to the front?

查看:74
本文介绍了如何将儿童表格带到最前面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用IsMdiContainer并将面板放置在父窗体中.但是有一个问题-子窗体放在面板后面.

I used IsMdiContainer and placed a panel in the parent form. But there is a problem - the child forms go behind the panel. How could I solve this?

推荐答案

您能解释一下为什么在Mdi Parent中使用面板吗?我看不出这样做的意义.但是要解决您的问题,请在显示您的子表单之前尝试添加此行代码

can you explain why are you using a panel in an Mdi Parent? I don''t see the point of doing it. but to solve your problem try to add this line of code before showing your child form

yourformname.Parent = yourpanelname;


好吧……您不应该这样做.它违反了MDI的思想.
但是,如果您真的想在mdi父对象上放置东西,请尝试在mdiclient上获取一个句柄.
您可以尝试在这里开始寻找:
在MDI客户端上获取句柄" [
Well... you shouldn''t do such a thing. It is against the phylosophy of mdi.
But, if you really want to place things on the mdi parent, try getting a handle on the mdiclient.
You may try to start looking here:
Getting a "Handle" on the MDI Client[^]


或者...您可能会作弊:
1.如果有孩子打开或
,请隐藏面板 2.固定面板,并仅将剩余的可用空间用于儿童或
3.实际在面板上创建一个默认子级,并将其固定,不封闭或
4.想到别的东西
Or... you may cheat:
1. hide the panel if there are any children open or
2. dock the panel and use only the remaining available space for the children or
3. actually create a default child with the panel on it and make it fixed, uncloseble or
4. think of something else


这篇关于如何将儿童表格带到最前面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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