打印表单的内容 [英] Print the contents of a Form
问题描述
大家好,
Hi all,
我正在尝试打印带有表单内容的页面。
I'm trying to print a page with a form contents.
我在该表单中添加了 PrintDocument 对象和 PrintPreviewDialog ,并在 PrintPreviewDialog <的文档中定义了
printDocument1 / em>在
PrintDocument 中,就像在VB和C#中找到的一些信息一样。
I added a PrintDocument object and a PrintPreviewDialog to that Form and defined the printDocument1 in the Document of PrintPreviewDialog as is in the PrintDocument like some information found to VB and C#.
它总是返回一个空白页......
It always returns a blank page...
我在Visual Basic和C#中找到了很多信息,但没有类似于C ++ ...
I found lots of information to Visual Basic and C# but nothing similar to C++...
如何将表单内容发送到打印机?
How can I send the Form contents to the printer?
谢谢
推荐答案
如果是
PrintPreviewDialog ,无论使用哪种语言,都可以处理 PrintPage 事件并使用收到的
Graphics 对象绘制内容。您是否已将此类事件处理程序添加到 printDocument1 ?
In case of PrintPreviewDialog, regardless the language, you can handle the PrintPage event and draw the contents using the received Graphics object. Have you added such event handler to printDocument1?
这篇关于打印表单的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!