c# - How to reset an image to default in Windows Form -


I have created a photo box in my windows form. I set it to a special image in the Properties section. I have then coded a method that changes the image based on criteria.

Have you tried just changing it to the default image within your code?

  pictureBoxName.BackgroundImage = yourDefaultImage;   

Currently, create a new zero method and whenever you want to reset it to the default, call it:

  public static zero setizetationToday () {PictureBoxName background image = yourDefaultImage; }   

Then call for method setImageToDefault ();

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -