C# 如何刷新图片框

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9030622/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-09 05:40:27  来源:igfitidea点击:

How to refresh PictureBox

c#winformspicturebox

提问by bakar

I've little question to ask.

我没什么要问的。

Let's say I've written an ellipse on pictureBox, then clicked a button. I want pictureBox to refresh itself.

假设我在图片框上写了一个椭圆,然后单击了一个按钮。我想让pictureBox 自己刷新。

I've tried PictureBox.Invalidate(), but could'nt made it. My best regards...

我试过了PictureBox.Invalidate(),但不能成功。我最诚挚的问候...

采纳答案by Smi

Try the method PictureBox.Refresh()(inherited from Control).

试试这个方法PictureBox.Refresh()(继承自Control)。

回答by JanOlMajti

Have you tried PictureBox.Update();? Or try something like this http://msdn.microsoft.com/en-us/library/system.windows.forms.picturebox.image.aspx

你试过PictureBox.Update();吗?或者试试这样的http://msdn.microsoft.com/en-us/library/system.windows.forms.picturebox.image.aspx