I need to take a screenshot of a specific window, it is maximized, just out of focus and most likely on another desktop (win 10). Is it possible to do this with any window handle or something like that? Are there any similar programs?

  • In WinAPI, this is done using the WM_PRINT window message. Managed wrapper I do not know, unfortunately. - Pavel Mayorov

1 answer 1

If the window is without any direct, then take a screenshot of the traditional GetDC(0) to get a picture of all the active desktop. Copy the area corresponding to the active window.

In .NET there is a wrapper over GetDC(0) - Graphics.CopyFromScreen .

How to take screenshots of an inactive desktop - I do not know. Most likely nothing, for surely only the active desktop is drawn.