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) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -