I wanted to know if there is a way in .NET to take a screenshot or save an image that has been rendered inside a SDL window. For example, the software FRAPS can capture the inside of windows that has been rendered by any SDL, GL or DirectX, so if there is something specific in common to those windows, is there a way I can capture it using .NET?
I can currently capture the entire window (with control bar) using user32.dll functions like SetForegroundWindow and GetWindowRect, but it always brings the window in front and also screenshots everything that would pop above this window, while FRAPS can record the window even when it's minimized and records only the window. That's why I would prefer to record only the SDL context of my specific process (by the way, I know what process it is and I know it runs SDL2, if this can help). And I only need a single shot, not a video.
You can answer either in C# or VB