在面板组件上打印表单 [英] print a form on a panel component

查看:74
本文介绍了在面板组件上打印表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI FRIENDS,

如何在面板组件上打印表单?
谢谢大家的帮助.

HI FRIENDS,

How can i print a form ona panel component?
thank you for all

推荐答案

不,你不能.



简短的答案是不建议这样做".请查看Dave的解决方案,但需要注意.

有关更多信息,请参见关于过去问题的讨论(和我的回答):
是否可以运行窗口表单另一个正在运行的窗口表单应用程序中的应用程序 [
No, you cannot.



The short answer would be "this is not recommended". Please see solution by Dave, but it needs care.

For more information, please see discussion (and my answer) on the past question:
Is it possible to run a window form application from another running window form application[^]

—SA


这很容易做到. Form类是从Control派生的,因此您只需要将表单实例添加到所需的Panel的Controls集合中即可.哦,但是只有在将Forms TopLevel属性设置为False之后.只要记住您仍在使用表单即可.您仍然必须显示表格才能显示它!
It''s pretty easy to do. The Form class derives from Control, so you just need to add the form instance to the Controls collection of the Panel you want. Oh, but only after you set the Forms TopLevel property to False. Just remember that your still using a Form. You still have to Show the form to get it to show up!
MyForm mf = new MyForm();
mf.TopLevel = false;
Panel1.Controls.Add(mf);
mf.Show();


这篇关于在面板组件上打印表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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