如何将一个表格放在另一个表格上? [英] How to place a form over another form?

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

问题描述

Hii

我想将一个透明的表单放置在另一个表单上,并且该透明的表单也不应单击鼠标后再返回.它应作为一个mdi起作用.是否有可能.

在此先感谢

请帮助... !!!!!!!!! 1

Hii

I want to place a transaparent form over another form ,also the transaparent form should not go back on mouse click.It should act asa mdi .Is it possible.

Thanks in advance

Pls help...!!!!!!!!!1

推荐答案

您可以尝试关注.

You can try following.

Form1.Controls.Add(Form2);



但是,这不是一个好习惯. MDI是所有表格的父项的最佳选择.


HTH



However it is not good practice. MDI is best option to be treated as parent for all the forms.


HTH


如果您要添加的表单是透明的,那有什么好处?它有什么作用?顺便说一句,只是因为表单是透明的,并不意味着您仍然不会获得边框和标题栏(除非您还更改了底层窗口样式).
If the form you''re adding is transparent, what good is it? What purpose does it serve? BTW, just because the form is transparent dfoesn''t mean you won''t still get a border and titlebar (unless you also change the underlying window style).


尝试一下.通过在父级上设置IsMdiContainer属性,可以使父级表单成为多文档"父级表单.然后在您的子窗体上,将MdiParent属性设置为与父窗体相同.最后,显示表格.

请参阅下面的代码段.

Try this. You can make your parent form a Multiple Document parent form by setting the IsMdiContainer property on the parent. Then on your child form, set the MdiParent property equal to the parent. Finally, show the form.

see snippet below.

Form1.IsMdiContainer = true;
Form2.MdiParent = Form1;
Form2.Show();



这是您想要的吗?



Is this what you want?


这篇关于如何将一个表格放在另一个表格上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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