Transparant icons

J

Jesper

Hi,

The ImageList class holds a property named
TransparentColor and the Color class defines a color
named Transparent. Where are these colors in the bitmap
editor. I cant see how I can correlate colors in the
bitmap editor to colors in the color class in order not
to get the background of an icon drawn in a control.

Please help
Best
 
V

Vijaye Raji

You don't have a specific color called the "transparent color" in a
non-alpha bitmap.

What you can do is choose any of the color that you want to be the
transparent color, say, Magenta and use it for the background (or anything
that you want transparent). And then, when you create the bitmap and add it
to the Image List, the chosen color will become transparent wherever you are
blasting this image to.

-vJ
 
P

Paul E Collins

Jesper said:
The ImageList class holds a property named
TransparentColor and the Color class defines
a color named Transparent. Where are these
colors in the bitmap editor.

Pick any unused colour as your image background, then set the ImageList's
TransparentColor property to that colour. The one you choose is up to you.

P.
 

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