I'm trying to make an image file from a control using CopyFromScreen
, and it fails unless I set the scale to 100%. With a larger scale the image is progressively offset left and up, the further right and down the window is on the screen. (Unfortunately my eyes struggle at 100%)
I initially tried using DrawToBitmap
but that fails as there's a rich text box in the control and it's documented that that won't paint.
I've read articles on this forum and followed the suggestion of including the dpiAware
setting in the manifest, but that has no effect. I'm no expert and I'm wondering if it's because I only have VS 2012 and my manifest declaration starts with asmv1
rather than asmv3
so I had to amend the example code?
Any suggestions most welcome.