Page 1 of 1

A way to save screenshot into a file?

Posted: Mon Oct 29, 2012 11:10 am
by wyll
Hi there,

is there a way to save the surrounding of the mousepointer as a screenshot into a specific folder?

something like
x=mouse.position.x;
y=mouse.position.y;

Point p = new Point(x,y);
//and then get the area like 50 pixels up, down, left & right 
//save that crop image in folder (C:\somewhere)
regards
Wyll

Re: A way to save screenshot into a file?

Posted: Tue Oct 30, 2012 1:49 pm
by Support Team
Hi Wyll,

This code could work for you:
Bitmap image = Imaging.CaptureDesktopImage(new Rectangle(int x, int y, int width, int height));
image.Save("test.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
, for more information please take a look at our online API: Imaging Class.

Regards,
Markus

Re: A way to save screenshot into a file?

Posted: Tue Oct 30, 2012 2:52 pm
by wyll
Hi Markus,

thanks a lot, that is exactly what i was looking for.

regards ,
Wyll