Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 987
  • Last Modified:

ImageList TransparentColor

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
AlexFM
Asked:
AlexFM
  • 2
  • 2
  • 2
  • +1
2 Solutions
 
JigitCommented:
AlexFM, I used Color.Teal with Toolbar.Appearance = ToolBarAppearance.Flat and it looks perfect.

HTH,
Jigit
0
 
AlexFMAuthor Commented:
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
 
Bob LearnedCommented:
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
AlexFMAuthor Commented:
Well, what is LightGray?
0
 
Bob LearnedCommented:
   Debug.WriteLine(ColorTranslator.ToWin32(Color.LightGray))
    Debug.WriteLine(Hex(ColorTranslator.ToWin32(Color.LightGray)))

Bob
0
 
JigitCommented:
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
 
jfchickimonCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now