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 ?
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.