你f11
进去你的Form1 看看
进去你的Form1 看看
解决方案 »
- missing ] after element list
- C#窗体应用程序中如何使用PrintPreviewControl打印预览excel表格,用PrintDocument打印excel表格
- 求C#组件第三方代码
- 请教下System.Windows.Forms.Timer与多线程问题 private void timer1_Tick(object sender, Even
- 这是webservices 返回的数据,我把它当做xml数据进行解析可以吗,请各位高手给个答案。
- 请教一个简单的正则表达式写法
- 找工作啦。。。招人的单位请进来一下。。。
- 如何知道一个工程是用哪个版本的VS开发的?
- winform 本机权限问题.
- ASP.Net 类文件怎么上传到服务器?
- datagridview的显示问题
- 求教,下面算法如何简化,写了1小时,感觉很拉杂,求指点
{
tg.DrawImage(bufferimage, 0, 0); //把画布贴到画面上
}
换成
Graphics tg = e.Graphics
tg.DrawImage(bufferimage, 0, 0);
protected override void OnPaint(PaintEventArgs e)
{
g.SmoothingMode = SmoothingMode.HighQuality; //高质量
g.PixelOffsetMode = PixelOffsetMode.HighQuality; //高像素偏移质量
using ( Bitmap bufferimage = new Bitmap(this.Width, this.Height))
{
Graphics tg = e.Graphics;
Rectangle rect = e.ClipRectangle;
Graphics g = Graphics.FromImage(bufferimage);
g.Clear(this.BackColor);
tg.DrawImage(bufferimage, 0, 0); //把画布贴到画面上
}
}你原意是想把临时画布释放掉的。
悄悄地在尾巴加上bufferimage.Dispose();嘻嘻