I have been fooling around with screen capture for awhile now and I managed to capture the entire screen, certain areas on the screen etc...
But when I go into a game and try to capture the screen, it completely ignores the game and instead, captures the desktop (or whatever is behind the game window). Another interesting fact is that the same thing happens with the PrtScn button.
Any ideas on how to capture a game's screen?
The screen capturing technique you are using works well for capturing things that aren't hardware accelerated. I suspect you'd have the same problem trying to capture a movie frame in Windows Media Player.
The solution is the do a screen capture from the hardware itself using DirectX. This article explains how to do that with some code and a managed wrapper around DirectX called SlimDX.
EDIT If Slim DX doesn't work for you, then you'd just have to find another managed wrapper around Direct X. I don't think you are going to be able to do the screen capture without working at the hardware level, and DirectX is the means of doing that on the Windows platform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With