图片框图像清晰. [英] picture box image clear.
本文介绍了图片框图像清晰.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
pictureBox1.Image = null;
pictureBox1.Refresh();
我想清除图片框的图像.我执行上面的代码.但是我无法清除图片框的图像.有错误吗?
I want to clear the image of picture box. I execute above code. But I couldn''t clear the image of picturebox. Is there an error??
推荐答案
尝试一下
Graphics g = graphics.fromimage(pictureBox1.Image);
g.Clear(pictureBox1.Backcolor);
或者您可以只使用Hide
和Show
or you can just use Hide
and Show
这篇关于图片框图像清晰.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文