给屏幕截图的方法
staticvoidMain(string[]args)
{
Bitmapbitmap=newBitmap(1024,768,PixelFormat.Format32bppArgb);
Graphicsgraphics=Graphics.FromImage(bitmap);
graphics.CopyFromScreen(0,0,0,0,newSize(1024,768));
bitmap.Save(@"C:Test.jpeg",ImageFormat.Jpeg);
}
{
Bitmapbitmap=newBitmap(1024,768,PixelFormat.Format32bppArgb);
Graphicsgraphics=Graphics.FromImage(bitmap);
graphics.CopyFromScreen(0,0,0,0,newSize(1024,768));
bitmap.Save(@"C:Test.jpeg",ImageFormat.Jpeg);
}
本文地址:http://www.45fan.com/dnjc/69517.html