Custom control toolbox icon transparency

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I create a custom control and I have added the 16x16 bmp embedded in the project. All works properly (the icon is correctly displayed in the toolbox) but I haven't figured out how to set the transparency color. Since the .bmp format doesn't have this feature, I think that Visual Studio chooses one color from the icon but I don't understand how. I found that VS doesn't choose always the same color or the same palette index (some of the icons in the toolbox have the transparency and some don't).
Does anyone find out how this feature is set?
Thanks
 
bottom left pixel color.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


GG said:
I create a custom control and I have added the 16x16 bmp embedded in the
project. All works properly (the icon is correctly displayed in the toolbox)
but I haven't figured out how to set the transparency color. Since the .bmp
format doesn't have this feature, I think that Visual Studio chooses one
color from the icon but I don't understand how. I found that VS doesn't
choose always the same color or the same palette index (some of the icons in
the toolbox have the transparency and some don't).
 
bottom left pixel color.

Thanks Mick, it works fine!
Only one detail: VS dowsn't make transparent only the color in that pixel but uses some sort of threshold and makes transparent also "similar" colors.

Thanks again for the reply
 
Back
Top