I have a situation where I'm taking a screenshot of the WorkingArea of my PrimaryScreen. If the resolution is set to 100% in Windows, it works perfectly fine
But if the resolution is set to 150%, it takes a partial screenshot.
The code I've made goes like this:
Bitmap captureBitmap = new Bitmap(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
Rectangle captureRectangle = Screen.AllScreens[0].Bounds;
Graphics captureGraphics = Graphics.FromImage(captureBitmap);
captureGraphics.CopyFromScreen(captureRectangle.Left, captureRectangle.Top, 0, 0, captureRectangle.Size);
captureBitmap.Save($@"{_localDestination}\{timeStampFormated}\Screenshot.png", System.Drawing.Imaging.ImageFormat.Png);
What am I missing, in order to have it take a screenshot and doesn't care about scaling?
Thanks in advance!