private void button2_Click(object sender, EventArgs e) { using (Bitmap bmp = new Bitmap(Width, Height)) { using (Graphics g = Graphics.FromImage(bmp)) { g.CopyFromScreen(this.Location.X, this.Location.Y, 0, 0, bmp.Size, CopyPixelOperation.SourceCopy); } bmp.Save(@"F:\printscreen.jpg", ImageFormat.Jpeg); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)