So I tried using
bmp.GetPixel(-100, 100);
But apparently I can't use a negative integer for it, throws out an error. So I then used
GetPixel(-100, 100);
https://learn.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-getpixel
And that worked but it's super slow...
Does anyone have a better method to get a pixel's color on a secondary monitor where I need to use a negative number for it's coordinate? I have spent hours trying to figure this out and any help or different methods would be greatly appreciated.
Sorry should have included the code for the screenshot, here it is.
Bitmap bmp = new Bitmap(SystemInformation.VirtualScreen.Width, SystemInformation.VirtualScreen.Height);
Graphics graphics = Graphics.FromImage(bmp as Image);
graphics.CopyFromScreen(-1920, 0, 0, 1080, bmp.Size);
I just want to take a screenshot of the second monitor and save it in a bitmap so that I can search for the pixel faster.