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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Background colour of toolbar images

Status
Not open for further replies.

MadsC

Programmer
Joined
Jan 31, 2003
Messages
19
Location
GB
I Want the background of my toolbar images to change in line with the desktop colour settings.

I have a toolbar linked to an imagelist.

I have inserted a gif with a transparent background into the imagelist list, however the image always appears on the toolbar with a white background or inverted.

I have tried changing the backcolor and maskcolor properties of the imagelist, but this appears to do nothing. Any ideas please
 
What color is your GIF background?, I have had trouble if its white, I generally use a 192, 192, 192 RGB color mix, and this works OK for me. (don't ask why I use 192, 192, 192, it just do, I can't remember why actually!)

Pete Vickerstaff - Hedra Software
 
Thanks, the gif has a transparent background, as I want the colour to change to match the users desktop settings.
 
afraid this doesn't work. The gif needs to be transparent so that the background colour matches the windows desktop.
 
VB doesn't genuinely support GIF's. It can load them, but converts them into Windows bitmap, and bitmaps don't support transparency...

Nevertheless, petevick's question is valid, since the way a gif handles transparency is by nominating one particular colour from the palette to be used as the 'transparent' colour, and the ImageList control allows us to emulate this.

So, assuming that your gif is using pure red (RGB 255,0,0) as the transparent colour, you would need to do the following:

1) Set the ImageList's UseMaskColor property to true
2) Set the ImageList's MaskColor property to RGB 255,0,0

 
Anyone know where I can fing a good calendar/ Scheduling control?
 
Er...it's probably best to start a new question in a new thread
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top