打印面板C#的内容 [英] print content of panel c#

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

问题描述

我有一个面板(大),而这个面板包含其他面板(小面板),我需要在大面板中打印所有内容??

i have one panel(big) and this panel contain other panel (smaller panel) i need to print all content in big panel ??

推荐答案

我会说这是一个坏主意(打印数据,而不是UI),但是如果您确实需要使用System.Windows.Forms.Panel这样的东西(您未指定,请参见我对问题的评论),则需要使用类,请参见 http://msdn.microsoft.com/en-us/library /system.drawing.printing.printdocument.aspx [
I would say this is a bad idea (print data, not UI), but if you really need something like this with System.Windows.Forms.Panel (which you did not specify, please see my comment to the question), you need to use the class System.Drawing.Printing.PrintDocument, see http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx[^], see a code sample closer the end of this page.

—SA


检查以下文章
使用打印预览对话框"打印面板控件的内容 [ ^ ]
从Windows窗体应用程序打印时,使用PrintDocument类给定的文章,该类用于定义可重用的对象,该对象将输出发送到打印机.
Check the below article
printing Contents of Panel Control using Print Preview Dialog [^]
given article using PrintDocument class that is used to defines a reusable object that sends output to a printer, when printing from a Windows Forms application.


这篇关于打印面板C#的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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