I need to change the background image of my form when i klick a button, and change it back to null again the second time it is clicked, how can i do this?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You should be able to set the BackgroundImage property of your form from the event handler of that button.
For example you could do it like this:
In order to remove the image, set the property back to null.
The image can also come from a resource.
Use BackgroundImage property:
to hide the image:
Put this source code to ClickButton method: