How can I tell if a window is fully painted? I'm taking some screen shots of different windows, which works fine except that I have to bring the window to the front before I can capture the image and sometimes it captures only a partial image because I'm BitBlting it before the window is fully drawn. It works OK only if I put in a long Sleep before the BitBlt.

I'v tried using both BringWindowToTop and SetForegroundWindow to bring the window to the top. I've tried a do until GetForegroundWindow = my hWnd with a DoEvents in the loop. I've tried RedrawWindow before the BitBlt. I still get a partial image sometimes unless I Sleep.

I can I tell if the window is fully painted?