How to capture desktop with partially transparent windows

quantum1976
08-17-2009, 10:46 AM
I've got an app that displays partially transparent drop shadows using 4 separate forms. I wanted to use the normal desktop capture method of GetDC, BitBlt, ReleaseDC, but that doesn't capture the drop shadows.

However, when I use the print screen method, it captures them. I'd like to avoid using this method because I've had problems in the past with the clipboard.

Does anyone have any ideas?


Thanks,
Rich

quantum1976
08-17-2009, 12:30 PM
I found the solution in another forum http://www.codeguru.com/forum/showthread.php?t=477515

Basically, you just have to add the constant CAPTUREBLT = &H40000000 and set this as the dwROP parameter in BitBlt

BitBlt Picture1.hdc, 0, 0, Picture1.ScaleWidth / Screen.TwipsPerPixelX, Picture1.ScaleHeight / Screen.TwipsPerPixelY, _
lngDesktopDc, 0, 0, vbSrcCopy Or CAPTUREBLT

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum