110,499
社区成员
发帖
与我相关
我的任务
分享
private void button3_Click(object sender, EventArgs e)
{
Bitmap myImage = new Bitmap(this.Width, this.Height);
Graphics g = Graphics.FromImage(myImage);
g.CopyFromScreen(new Point(this.Location.X, this.Location.Y), new Point(0, 0), new Size(this.Width, this.Height));
IntPtr dc1 = g.GetHdc();
g.ReleaseHdc(dc1);
myImage.Save(@"c:\screen1.jpg");
}