We help IT Professionals succeed at work.

IMAGE LIST MASKCOLOR

neo23
neo23 asked
on
Why does the imagelist draw the transparent area of my icons in black after compiling? This is driving me nuts.
The same thing happens when i deselect the use maskcolor property in the imagelist control. Am i using the wrong color to define transparent areas?

Im using COMCTL32.OCX

HELP ME!!!
Comment
Watch Question

Top Expert 2005

Commented:
You should use 16 color bmp's (not icons) for images in the Imagelist.

If you need icons, you can place them in a resource (Res) file.

Author

Commented:
But i want icon resources in my toolbar, how can i load them from a resource file. ???
Top Expert 2005

Commented:
Can't you convert the icons into bmp files, then load them into the ImageList?

Author

Commented:
Ive done that. But the maskcolor problem remains.
How and in which color do I paint the mask "the transparent area of the bmp"?

Can i do it in ms paint?
Top Expert 2005
Commented:
Set the ImageList property UseMaskColor = True
Set the MaskColor to a color in the palette to any color except white.  Make sure that color is the same as the "transparent" color in the bitmap.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.