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:
- the title.
- the main process it's created (and process can create undetermined number of windows).
it's not active window.
would appreciate help.
Comments
Post a Comment