Find Window By Name and Take a Screenshot of the Window

Viewed 35

I would like to take a screenshot of an open window / app. The environment might have a multiple displays or a single display as well as the application can be a full screen or windowed.

Here are the list of things I need to be able to get it right;

  • Find a Window by process name, for example app.exe.
  • Take a full screenshot of the app.
  • Take a portioned screenshot. Such as only top right corner with determined width and height.

It looks like github.com/lxn/win provides some functionality but not sure what exactly I need to use to get it done as I'm not familiar with WIN API or how to use it at all (not a Win user).

I looked into github.com/kbinani/screenshot but it takes a screenshot of a desktop of given screen index. Put me in a bit of right direction but couldn't get it done.

I'd appreciate any help in that matter.

0 Answers
Related