Działa mi ten kod poniżej na Windows XP ale nie mogę dojść do tego dlaczego nie działa mi on na Winodws Vista i Windows 7 jak jest włączona jakaś gra DirectX lub OpenGL w Fullscreen.
//start from here to compress the JPEG file
// The screenshot will be stored in this bitmap.
Bitmap capture = new Bitmap(ScreenWidth, ScreenHeight);
// The code below takes the screenshot and
// saves it in "capture" bitmap.
g = Graphics.FromImage(capture);
g.CopyFromScreen(Point.Empty, Point.Empty, Screen.PrimaryScreen.Bounds.Size);
Bitmap ImgTemp;
ImgTemp = new Bitmap(capture);
Byłbym wdzięczny za pomoc.