简体   繁体   English

拍摄窗口后面的屏幕截图

[英]Take screen shot of behind the window

I'm designing a WPF application which has the Aero glass effect and works in Windows 8 (where we can't leverage the actual Windows Aero using DwmExtendFrameIntoClientArea ). 我正在设计一个具有Aero玻璃效果的WPF应用程序,并且可以在Windows 8中使用(在Windows 8中,我们无法使用DwmExtendFrameIntoClientArea利用实际的Windows Aero)。
To do so I need to take a snapshot of the region under my window without my application on it (and then apply blur effect on that image)! 为此,我需要拍摄窗口下没有应用程序的区域的快照(然后在该图像上应用模糊效果)! I'm using Graphics.CopyFromScreen but it captures the screen with my application included. 我正在使用Graphics.CopyFromScreen但它捕获了包含我的应用程序的屏幕。 I can't minimize the window, since this image is being redrawn every 100 msecs. 我无法最小化窗口,因为此图像每100毫秒重新绘制一次。
How can I achieve this functionality? 如何实现此功能? (I'm using .NET 4.0) (我正在使用.NET 4.0)

you may take win32 Api rout 你可能会采取win32 Api溃败

to caputre window 到caputre窗口

If u really want to take a screenshot u HAVE to minimize or make it invisible. 如果您真的想拍摄屏幕快照,则必须使其最小化或使其不可见。 Additionally blurring every 100ms takes too much perfomance. 此外,每100毫秒模糊一次会占用太多性能。 Im sorry but if there is a solution it wont be lag free. 对不起,但是如果有解决方案,那将是没有延迟的。 Anyway good luck. 无论如何,祝你好运。 May you take a look at this: http://brianlagunas.com/add-windows-8-aero-theme-support-to-your-wpf-custom-control/ 请您看看以下内容: http : //brianlagunas.com/add-windows-8-aero-theme-support-to-your-wpf-custom-control/

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

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