Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Icon Help 1

Status
Not open for further replies.

tekomni

Programmer
Nov 25, 2002
40
US
I have some icons I would like to use in buttons and a toolbar but they have a pink background. I believe there is a way to make that pink color transparent so that the button color shows through. Any ideas how to do this ?
 
Hi,

On a command button, set the Style to Graphical, UseMaskColor to True and set the MaskColor to the same pink colour as your icon background.

To use them on a toolbar I would stick them in an ImageList control and use the MaskColor property for the ImageList control to make the pink transparent. Set the MaskColor to pink and the BackColor to the Windows palette colour "Button Face".

Incidentally, if these are icons (.ICO) files then the pink should be transparent anyway!

Note that you need the EXACT shade of pink in order for either of these methods to work, you might need to use a graphics package to get the exact RGB colour for the pink.

- Andy.
 
Or you could edit the icon file in a graphics package and set the pink background colour to tranparent.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top