打印表单的内容 [英] Print the contents of a Form

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

问题描述


大家好,

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屋!

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