I have a simple question, if I have a button called myButton in Windows Forms, what is the difference of myButton.Image and myButton.BackgroundImage?
Thank you in advance!
I have a simple question, if I have a button called myButton in Windows
Share
BackgroundImageis like wallpaper, it covers the whole background.. you should use patterns or full pictures for the background. If you are just trying to show an icon useButton.ImageFor the
Button.Imageproperty from MS documentation:The Image displayed on the button control.
The BackgroundImage
An Image that represents the image to display in the background of the control.
So you can set a
BackgoundImageas well as aButton.ImagetheButton.Imagewill be placed over top of theBackgroundImageHere is an example I just created of a
Buttonwith bothBackgroundImageandButton.Imageset. Clearly there is a background image, then my button text and a button image next to my text.The cool thing is you can change where you place your
Button.Imagewith theImageAlignpropertyHere’s the same button using an icon with transparency and NOT using RTL and I set the background color to light blue and it all works fine. So either my icon with transparency really isn’t transparent or the docs are wrong.