I'm using System.Drawing.Graphics.CopyFromScreen to grab a partial screenshot of the desktop. I've noticed some curious behaviour. On some machines, when the application (WPF) window has AllowsTransparency="True", calling CopyFromScreen will capture whats 'under' the window. But on other machines, it captures the calling window too.
I've tried it on a number of machines, and operating systems, and haven't found a pattern. On XP and Windows 7 laptops it captures under the transparent window. On one windows 7 desktop we have, it captures the window itself. Aero, or other Windows 7 display features seem make no difference.
Could it be a graphics card issue? Is there any way to get consistent behaviour across all machines, or to predict or detect when this issue will occur?
EDIT Thanks to the link provided by Hans Passant below, and some further testing, I now understand that this issue connected to window transparency only. On some machines, CopyFromScreen captures all windows, on other machines it only captures non-transparent windows.