i was trying to get screenshot for the whole screen, but when i try to use Screen.PrimaryScreen it gets the screen right, but not the full screen. The strange part when i try to save the image i get, it's equal the resolution as my PC's resolution is. Here is the code :
var bmpScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
//Create a graphics object from the bitmap.
var gfxScreenshot = Graphics.FromImage(bmpScreenshot);
//Take the screenshot from the upper left corner to the right bottom corner.
gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X,
Screen.PrimaryScreen.Bounds.Y,
0,
0,
Screen.PrimaryScreen.Bounds.Size,
CopyPixelOperation.SourceCopy);
bmpScreenshot.Save("New.png", ImageFormat.Png);
As you can see it should work, but i got no idea why it doesn't get the complete Full Screen, Here is a picture :
Thanks.