Solved

ImageList TransparentColor

Posted on 2004-10-06
7
920 Views
Last Modified: 2008-02-01
I make toolbar for Windows Forms application. ImageList for this toolbar has TransparentColor property. I want to draw each button background with this color. But I cannot find relation between these colors. TransparentColor property opens Colors dialog which has Custom, WEB and System tabs. Suppose I select LightGray color. How can I set bitmap background to the same color, I don't know it's RGB.
This is not programming question, just problem in using VS IDE.
0
Comment
Question by:AlexFM
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 4

Accepted Solution

by:
Jigit earned 250 total points
ID: 12235705
AlexFM, I used Color.Teal with Toolbar.Appearance = ToolBarAppearance.Flat and it looks perfect.

HTH,
Jigit
0
 
LVL 48

Author Comment

by:AlexFM
ID: 12236768
Thanks, I need more information. How can I set Color.Teal for ImageList? Can I do this in Form Designer of in the code? How should I draw bitmap buttons to see nice Pushed effect?
Currently I have Color.Transparent and bitmap background white. Pushed (checked) buttons looks almost like normal buttons. I want to have light gray background in normal state and white background in pushed state. How can I do this - what properties should I use in ImageList, ToolBar and what colors should I use in button bitmaps?
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 250 total points
ID: 12237438
The TransparentColor property for the ImageList is what color to make transparent for each of the images in the list.  So if you have LightGray, then any colors that have that RGB value in the image will be made transparent.

Is this what you are looking for or even talking about?

Bob
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 48

Author Comment

by:AlexFM
ID: 12237605
Well, what is LightGray?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12237654
   Debug.WriteLine(ColorTranslator.ToWin32(Color.LightGray))
    Debug.WriteLine(Hex(ColorTranslator.ToWin32(Color.LightGray)))

Bob
0
 
LVL 4

Expert Comment

by:Jigit
ID: 12262821
AlexFM, thanks for accepting my answer. Would you be so kind to feel feedback? (Just click on Feebdack link near the accepted answer)

Thanks in advance,
Jigit
0
 

Expert Comment

by:jfchickimon
ID: 13288264
On the Custom tab, right click on one of the open colors on the bottom, and you can specify which color you want to be transparent, using RGB values.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question