仅捕获一种形式的一部分的屏幕截图? [英] Capture screenshot of only a section of a form?

查看:172
本文介绍了仅捕获一种形式的一部分的屏幕截图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在有一个WinForm的是,在运行时,我需要它的部分的截屏并保存为图像。我特别希望有一个叫PANEL1面板的屏幕截图。我已经能够找到如何让整个web表单,或整个屏幕截图信息......但我已经很难找到让屏幕的只是部分信息。

I currently have a winform that, during run time, I need to take a screenshot of a section of it and save it as an image. In particular, I want a screenshot of a panel called "panel1". I've been able to find information on how to get screenshots of entire webforms, or entire screens... but I've had difficulty finding info on getting just a portion of the screen.

有没有人有可能指向我的方向是正确的信息吗?在MSDN站点上的文件,我应该寻找将是一个巨大的帮助连名字!谢谢!

Does anyone have any information that could point me in the right direction? Even the name of the documentation on MSDN's site that I should be looking for would be a huge help! Thanks!

推荐答案

控制类从面板提炼出来有一个方法 DrawToBitmap()。您可以使用。

The Control class from which Panel derives has a method DrawToBitmap(). You can use that.

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.drawtobitmap.aspx

这篇关于仅捕获一种形式的一部分的屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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