打印滚动能够windows窗体。 [英] Printing a scroll-able windows form.

查看:156
本文介绍了打印滚动能够windows窗体。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  <一href="http://stackoverflow.com/questions/1493591/how-can-i-take-a-screenshot-of-a-winforms-control-form-in-c">How我可以带一个WinForms控制/表在C#中的截图?

我有一个窗口的形式与名称和图片列表。该名单很长,所以有一个滚动面板了。现在,我想打印此表,但我不能,因为打印功能,只打印了看得见的部分,因为当你向下滚动看不见的部分被看到。那么,有没有一种方法可以一次打印整个形式?

I have a windows form with a list of names and pictures. The list is long and so there is a scroll panel for it. Now, I would like to print this form but I can't because the the print function only prints the "visible" portion since the invisible portion is seen when you scroll down. So, is there a way to print the whole form at once?

推荐答案

查找在Visual Basic的PowerPack工具箱打印表单控件

Look for the Print form control in the Visual Basic PowerPacks toolbox

要打印滚动形式的完整的客户区试试这个...

To print the complete client area of a scrollable form try this...

1.In工具箱,点击的Visual Basic的PowerPack选项卡,然后PrintForm组件拖到窗体。

1.In the Toolbox, click the Visual Basic PowerPacks tab and then drag the PrintForm component onto the form.

的PrintForm组件将被添加到组件托盘

The PrintForm component will be added to the component tray.

2.In属性窗口中,PrintAction属性设置为PrintToPrinter。

2.In the Properties window, set the PrintAction property to PrintToPrinter.

3.加入以下code在适当的事件处理程序(例如,在点击事件处理要打印按钮)。

3.Add the following code in the appropriate event handler (for example, in the Click event handler for a Print Button).

1.PrintForm1.Print(我,PowerPacks.Printing.PrintForm.PrintOption.Scrollable)

1.PrintForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable)

给这个一杆,让我知道它是如何工作的你。

Give this a shot and let me know how it works out for you.

这篇关于打印滚动能够windows窗体。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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