NetBlog主题

winForm截图,截当前整个窗体和某个区域
C#基础

winForm截图,截当前整个窗体和某个区域

2825 0

//截取整个窗体 private void button1_Click(object sender, EventArgs e){Bitmap bit=new Bitmap(this.Width,this.Height);//实例化一个和窗体一样大的bitmapGraphics g=Graphics.FromImage(bit);g.CompositingQuality = CompositingQuality.HighQuality;//质量设为最高g.Co…