ImageList fails to load the alpha channel
There is a bug in the ImageList component that ignores the alpha channel no matter the source format (.ico, .png) and distorts the display of images due to a failure to render transparency correctly. Thus the TabControl is so compromised in regards to icons in its tabs. The same applies to other controls that use ImageList.
This article provides a solution and explains the problem in more detail:
https://www.codeproject.com/articles/9142/adding-and-using-32-bit-alphablended-images-and-ic
To be able to use DrawImage in general, make sure to include the png as a resource and then load it as expected via var image = Properties.Resources.some_image
Otherwise, use ico files and DrawIcon
Comments
Post a Comment