I need to change the background image of my form when I press the button and change it to zero again the second time it is pressed, how can I do this?
Use the BackgroundImage property:
form.BackgroundImage = image;
to hide the image:
form.BackgroundImage = null;
Put this source code in the ClickButton method:
form.BackgroundImage = form.BackgroundImage == null ? image : null;
You should be able to set the BackgroundImage property of your form from the event handler of this button.
For example, you can do this as follows:
this.BackgroundImage = new bitmap (@ "c: \ Temp \ image.bmp");
, null.
.