如何使A4大小的Form1,然后打印在窗体上存在的内容 [英] how to make the Form1 of A4 size and then print the contents present on the form

查看:74
本文介绍了如何使A4大小的Form1,然后打印在窗体上存在的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何制作A4大小的Form1,然后打印表格上显示的内容.

如何打印表单的所有内容,甚至是不可见的部分(即滚动表单后可见的部分)

感谢未决...

how to make the Form1 of A4 size and then print the contents present on the form .

how do i print all the contents of the form , even the part which is not visible ( i.e visible after scrolling the form )

thanks pending......

推荐答案

此处VB中的一种解决方案 [ ^ ],但您可以进行修改等.

我还使用了 PrintPreview [ PrintDocument [ PageSetupDialog [将VB.NET转换为C# [
Here''s one solution in VB[^], but you can modify, etc.

I''ve also used the PrintPreview[^] control in combination with PrintDocument[^] and PageSetupDialog[^] to let the user select the paper size, but you can just set the size without the dialog if you are certain that the paper is available, etc.

For Code conversion
Convert VB.NET to C#[^]


打印表格不是很很好的构想.您需要在数据层中建议使用的表单上打印数据,因此PrintDocument( ^ ])提供了一个很好的灵活解决方案.

—SA
Printing a form is not a very good conception. You need to print data on a form from your data layer that is recommended to have, hence PrintDocument (http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument%28v=vs.71%29.aspx[^]) provides a good flexible solution.

—SA


这篇关于如何使A4大小的Form1,然后打印在窗体上存在的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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