打印winform C#(仅限内容) [英] Printing winform C# (only contents)

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

问题描述

大家好,我需要一些帮助或方向来解决我手边的这个问题。最近,我能够打印winform,如下所示。

但是,我现在希望能够只打印内容,这意味着我不希望边框和按钮出现在最后文件。有什么方法可以解决这个问题吗?

非常感谢任何帮助。



我尝试了什么:



Imgur:互联网的神奇之处 [ ^ ]

Hi guys, I need some help or direction in approaching this issue i have on hand. Recently, i was able to print the winform as shown below.
However, i now wish to be able to print only the contents which means i do not want the borders and the button to be present in the final document. Is there any way to approach this problem?
Any help is very much appreciated.

What I have tried:

Imgur: The magic of the Internet[^]

推荐答案

然后你需要使用PrintDocument类实例: PrintDocument类(系统) .Drawing.Printing)| Microsoft Docs [ ^ ]它可让您完全控制打印内容,位置和显示方式。
Then you need to use a PrintDocument class instance: PrintDocument Class (System.Drawing.Printing) | Microsoft Docs[^] It gives you full control over what is printed, where, and how it appears.


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

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