0

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:

  1. The screenshots are of roughly 33% of the target window.
  2. The screenshots are missing the body of the images.

Here is an example of the incomplete screenshot

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?

Patrick
  • 351
  • 1
  • 6
  • 20
  • 1
    You can just paste your screenshot into the question body. As a new user you won't be able to inline it but someone else can edit your question to make it so. This would be preferable to sending people off to drop box (the link for which doesn't appear to work for me, at least) – Caius Jard Jan 08 '22 at 09:28
  • Are you sure the shot you're taking really does encompass the region you expect? Have you use eg a window spy tool to ensure the extents of your desired window are true? – Caius Jard Jan 08 '22 at 09:29

0 Answers0