C# console app that gets current active process/window info including Handle, PID, WindowTitle, WindowClass, Processname, Filename using Windows API. And it takes screenshots for active window in 2 ways - using PrintWindow API and classic method.
The PrintWindow win32 api will capture a window bitmap even if the window is covered by other windows or if it is off screen. But it does not work on some kind of applications. (https://stackoverflow.com/a/911225/23280849)