简体   繁体   English

捕获滚动​​窗口内容屏幕截图

[英]Capture a scrolling window contents screenshot

I need to capture a screenshot of the scrolling window's client area, using .NET. 我需要使用.NET捕获滚动窗口客户区的屏幕截图。 My first priority is capturing web page screenshots. 我的首要任务是捕获网页截图。 But this can be not the only one use case. 但这可能不是唯一一个用例。 For example it can be also a text area in the Notepad. 例如,它也可以是记事本中的文本区域。

Some applications (FastStone Capture, PicPick) can emulate user behavior to reach hidden part of a scrollable area and capture it. 某些应用程序(FastStone Capture,PicPick)可以模拟用户行为以到达可滚动区域的隐藏部分并捕获它。 I'm looking for something like this or recommendations for alternative way to get the same result. 我正在寻找类似这样的东西或建议替代方法来获得相同的结果。

替代文字

You can get windows to redirect a WM_PAINT to an offscreen buffer with WM_PRINT and WM_PRINTCLIENT. 您可以使用WM_PRINT和WM_PRINTCLIENT将窗口重定向到WM_PAINT到屏幕外缓冲区。 This is better than screenscraping because it makes sure that obscured parts of a window(behind other windows) is painted anyway. 这比screenscraping更好,因为它确保窗口的遮挡部分(在其他窗口后面)无论如何都被绘制。 If your target window scrolls by scrolling a child window position, WM_PRINT should apply. 如果目标窗口通过滚动子窗口位置滚动,则应该应用WM_PRINT。 Just maybe it also helps your scenario. 也许它也可以帮助您的方案。

I've continued my search and founded IECapt, — an open source tool which can take a web page screenshot using IE inside of it. 我继续我的搜索并创建了IECapt,这是一个开源工具,它可以使用IE内部的网页截图。 It has С++ and .NET versions. 它有С++和.NET版本。 Also there are Qt/WebKit-based analog from the same author: http://cutycapt.sourceforge.net . 还有来自同一作者的基于Qt / WebKit的模拟: http//cutycapt.sourceforge.net

This tools is not a direct answer for my question, but both of them solve the original problem by 90%. 这个工具不是我的问题的直接答案,但它们都解决了90%的原始问题。

Have you looked at Snagit? 你看过Snagit吗? http://www.techsmith.com/download/accessories/default.asp http://www.techsmith.com/download/accessories/default.asp

Also, here's ac# utility that seems to do what you're asking for: http://www.codeproject.com/KB/graphics/IECapture.aspx 此外,这里的ac#实用程序似乎可以满足您的要求: http//www.codeproject.com/KB/graphics/IECapture.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM