Custom control toolbox icon transparency

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
 
M

Mick Doherty

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).
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top