screenshot - Screen Capture Complications with WPF window on top -
i need capture entire screen transparent wpf window topmost window. tried 2 approaches:
- using system.windows.drawing.graphics.copyfromscreen
- using winapi getdesktopwindow
both methods yield same result. entire screen except topmost transparent wpf window. wpf window w created with:
w.allowstransparency = true; w.windowstyle = system.windows.windowstyle.none; w.background = new solidcolorbrush( color.fromargb( 1, 0, 0, 0 ) ); w.topmost = true;
plus content of course. window covers entire screen surface.
apparently, wpf window draws on surface not included in getdesktopwindow.
can pls shed light on , share ideas how entire screen surface?
just found solution:
as far can tell there no solution graphics.copyfromscreen approach because you'd need or copypixeloperation.captureblt copypixeloperation.sourcecopy can't. usual m$ inconsistency madness...
however, winapi approach works since can combine srccopy , captureblt when using bitblt. without captureblt transparent , layered windows not included.
Comments
Post a Comment