We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to make XP icons appear transparent?

I want my XP icons (designed using 24 bit colour + 8 bit alpha) to appear "smooth", like the standard XP icons. However - when inserting the icons in imageLists, and then using them in menus, toolbars, XPToolbars or XPMmenus - the alpha channel information seems to be handled very strange. The edges are jagged and the drop shadow becomes completely dark. I also tried using one of the original XP icons. Same result (!) Have I missed to set some property? /E

1 Reply

AD Administrator Syncfusion Team October 18, 2002 10:58 AM UTC

;-) Found the solution myself. It seems as if there is something not working completely right when using imageLists at design-time (or am I missing something here). A lot of discussion around this on msdn/newsgroups. When you add correctly designed XP icons (24 bit colour + 8 bit alpha = 32 bit) into imageLists at designtime, the alpha channel seems to be ignored. However, if you add the icons either a) as embedded resources See example "embedIcon.cs" (Icons are included in the project, as "Embedded resource") b) at runtime See example "runtimeIcon.cs" the imageList will hold and handle the alpha channel correctly. Of course, you also need a .manifest-file together with the .exe in order to make the alpha-blending work. (Sorry for the rough examples, too little time for this...) /M

Live Chat Icon For mobile
Up arrow icon