c#实现对屏幕截图
int width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width; int height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height; int top = 0; int left = 0; System.Drawing.Bitmap printscreen = new System.Drawing.Bitmap( width, height ); System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage( printscreen as Image ); graphics.CopyFromScreen( top, left, 0, 0, printscreen.Size ); printscreen.Save( outputfile, imagetype );
日期:2020-04-11 22:50:25 来源:oir作者:oir