Is it possible to print screen minimized windows? I think it IS, because Windows's taskbar preview does do it. Thanks
(please correct my english errors)
Is it possible to print screen minimized windows? I think it IS, because Windows's taskbar preview does do it. Thanks
(please correct my english errors)
I believe it would be. I'm not a C# guy, so I'm sure there's an easier way with the crafty managed functions, but here's some sample code if you were to go it in C: http://msdn.microsoft.com/en-us/library/dd183402(VS.85).aspx
I'm pretty confident that this is not possible, at least by an external application like yours. When an application window is minimized, the window cannot (and does not) receive WM_PAINT messages, meaning that it is impossible to ask the window to redraw itself while it is minimized (or, "take a picture of it"). This is a limitation (or a rule) of the Windows API.
The taskbar "gets around this" by displaying a cached image (which is the last snapshot the DWM took of the window before it was minimized) and so it is not in fact taking a current picture of the window. You can test this by running an application which periodically updates itself, and then minimizing it -- you will see that the preview image will not be updated until it is restored.
The only way you could get around this is to do what the taskbar does -- periodically take a picture of the window you want, and when it is minimized, use the cached image instead. Of course, this means your app will have had to have been following the target window some time in advance (this obviously won't work if the first time you want to take a snapshot of the window is while it is minimized).