Hi
I need to capture screenshots from DirectX games. I am using this code but sometimes I get totally blank images or the image of the desktop (but the game is open)
int screenWidth = Screen.GetBound s(new Point(0, 0)).Width;
int screenHeight = Screen.GetBound s(new Point(0, 0)).Height;
Bitmap bmpScreenShot = new Bitmap(screenWi dth, screenHeight);
Graphics gfx = Graphics.FromIm age((Image)bmpS creenShot);
gfx.CopyFromScr een(0, 0, 0, 0, new Size(screenWidt h, screenHeight));
bmpScreenShot.S ave("test.jpg", ImageFormat.Jpe g);
There is actually no problem on XP, sometimes on Vista I get blank screen and on Windows 7 I get the view of desktop all the time but the game is on foreground. I see the game as a little black box at upper left corner on Windows 7.
I really need help.
Thanks.
I need to capture screenshots from DirectX games. I am using this code but sometimes I get totally blank images or the image of the desktop (but the game is open)
int screenWidth = Screen.GetBound s(new Point(0, 0)).Width;
int screenHeight = Screen.GetBound s(new Point(0, 0)).Height;
Bitmap bmpScreenShot = new Bitmap(screenWi dth, screenHeight);
Graphics gfx = Graphics.FromIm age((Image)bmpS creenShot);
gfx.CopyFromScr een(0, 0, 0, 0, new Size(screenWidt h, screenHeight));
bmpScreenShot.S ave("test.jpg", ImageFormat.Jpe g);
There is actually no problem on XP, sometimes on Vista I get blank screen and on Windows 7 I get the view of desktop all the time but the game is on foreground. I see the game as a little black box at upper left corner on Windows 7.
I really need help.
Thanks.
Comment