.comment-link {margin-left:.6em;}
Gert .Net
[GertDotNet]
20060411
 
tommy.blog: Screen capture tool
tommy.blog: Screen capture tool

Something always handy: How to capter (a part) of the screen. And this is not even difficult.

Rectangle region = ...; // the screen region to capture
using (Bitmap bitmap =
new Bitmap(region.Width, region.Height, PixelFormat.Format32bppArgb))
using (Graphics bitmapGraphics = Graphics.FromImage(bitmap))
{
bitmapGraphics.CopyFromScreen(region.Left, region.Top, 0, 0, region.Size);
Clipboard.SetImage(bitmap);
}

Comments: Een reactie plaatsen



Powered by Blogger