C# How to get a screenshot of a window? -


i'm getting screenshot of full screen using method

bitmap bitmap = new bitmap(screen.primaryscreen.bounds.width,                            screen.primaryscreen.bounds.height,                            pixelformat.format32bppargb);  using (graphics graphics = graphics.fromimage(bitmap)) {      graphics.copyfromscreen(screen.primaryscreen.bounds.x,          screen.primaryscreen.bounds.y,          0, 0, screen.primaryscreen.bounds.size,          copypixeloperation.sourcecopy); } 

now improve in way can screenshot of specific window.

i know couple things it:

  1. the title.
  2. the main process it's created (and process can create undetermined number of windows).

it's not active window.

would appreciate help.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -