C# Picturebox 刷新 Refresh()图像一闪而过

来源:互联网 发布:linux打开文件数最大值 编辑:程序博客网 时间:2024/05/17 06:07

C# Picturebox 刷新 Refresh()图像一闪而过

问题描述:

重载OnPaint函数

在OnPaint函数中使用了

            Graphics gra = this.pictureBox1.CreateGraphics();

重新创建了Graphics导致图像一闪而过。

改为e.Graphics即可。

原创粉丝点击