Clear image on picturebox

后端 未结 13 1780
不思量自难忘°
不思量自难忘° 2020-12-05 13:13

How can I clear draw image on picturebox? The following doesn\'t help me:

pictbox.Image = null;
pictbox.Invalidate();

Please help.

13条回答
  •  庸人自扰
    2020-12-05 13:24

    As others have said, setting the Image property to null should work.

    If it doesn't, it might mean that you used the InitialImage property to display your image. If that's indeed the case, try setting that property to null instead:

    pictBox.InitialImage = null;
    

提交回复
热议问题