What are these constants?
theHwnd = &HAC03DC ' &H460450
GetClientRect theHwnd, rctW returns a rectangle with all zeros.
However, if I place this statement at the very beginning,
hWnd = GetForegroundWindow()
then it works, except the resulting size is the maximum of all previously captured windows, see attached image. Also, as you point out, sometimes the captured window is black.
The code for capturing the entire window works satisfactorily so, maybe it would be easier if the dimensions of the client area could be somehow calculated / retrieved. Then a BitBlt would easily do the trick.




Reply With Quote