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
Post a Comment