I have been trying to re-use the code from these 2 answers.
Get a screenshot of a specific application and Capture screen of Window by handle
In both cases, I get strange errors:
- The screenshots are of roughly 33% of the target window.
- The screenshots are missing the body of the images.
I can fix the size easily by changing
Bitmap bmp = new(rc.Width, rc.Height, PixelFormat.Format32bppArgb);
to
Bitmap bmp = new(rc.Width * 3, rc.Height * 3, PixelFormat.Format32bppArgb);
However I can't get the bodies of the programs to appear.
Has anyone any idea what has changed since these useful posts were made? Why is the code only partially working?