It looks like alpha channel data is lost when images are stored as ImageStream
(VS Designer default behavior). Therefore, if you can stop using Designer to set images in ImageList
, you can use translucent images before ColorDepth.Depth32Bit
. This is very inconvenient, but it works.
So, you can put your images in the Resources.resx
file and add them to the appropriate place in the code. For example, in the constructor from UserControl
/ Form
after calling InitializeComponent()
using code:
_imageList.Images.Add(Resources.Image32); _imageList.Images.SetKeyName(0, "Image32"); _myButton.Image = 0;
(This information is available in the comments to the answer, I added this as an answer, so it would be harder to miss another available option)
source share