如何打印屏幕或页面太大的表单 [英] How To Print a Form That Is Too Large for the Screen or Page

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

问题描述

我有一个很大的形式,我打算持有公司数据的所有细节,但我需要打印表格。我尝试使用printform方法,但它只打印表单的某些部分。我做了一些搜索,但发现vb6中的文章使用了pictrebox的hDC来打印表单,但我不知道如何在vb.net中实现这些。请有人帮我提供打印表格的代码。谢谢

I have a big form which I intend to hold all the details of a company's data but I needed to have the form printed. I tried using the printform method but it only prints some part of the form. I made some searches but found articles in vb6 that used the hDC of a pictrebox to print a form but I don't know how to implement such in vb.net. Please can someone help me with the code to print the form. Thanks

推荐答案

查看 PrintDocument类 [ ^ ] - 它允许您准确指定打印的内容,位置和大小。你不应该使用PrintForm - 这是一个糟糕的解决方案,通常不会产生良好的结果。当你需要整个屏幕的图像来正确显示错误时,它才真正用于调试。
Look at the PrintDocument class[^] - it allows you to specify exactly what is printed, where, and what size. You shouldn't use PrintForm - it's a poor solution that doesn;t generally give good results. It's only real use is for debugging when you need an image of the whole screen to show an error properly.


可选:如何:使用PrintForm组件(Visual Basic)打印表单 [ ^ ]


这篇关于如何打印屏幕或页面太大的表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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