Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/257.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 用C打印winform#_C# - Fatal编程技术网

C# 用C打印winform#

C# 用C打印winform#,c#,C#,如何在c#2008中打印整个winform 我的表单包含picturebox和3个文本框。虽然没有第三方库也是可行的,但我过去成功地使用了它。使用Visual Basic PowerPack中的PrintForm控件。即使在C#项目中,也可以从VS2008的工具箱中获得它。我想它可能是在SP1中添加的。更多信息。使用以下代码 using Microsoft.VisualBasic.PowerPacks.Printing; private void printButton_Click(objec

如何在c#2008中打印整个winform


我的表单包含picturebox和3个文本框。

虽然没有第三方库也是可行的,但我过去成功地使用了它。

使用Visual Basic PowerPack中的PrintForm控件。即使在C#项目中,也可以从VS2008的工具箱中获得它。我想它可能是在SP1中添加的。更多信息。

使用以下代码

using Microsoft.VisualBasic.PowerPacks.Printing;

private void printButton_Click(object sender, EventArgs e)
{
   printForm1.Print(this, PrintForm.PrintOption.ClientAreaOnly);
}

有关打印选项,请参见

中的此链接。是的,该链接可用,如何使用?在提问之前,您是否至少可以尝试查看一下?