Solved

ImageList TransparentColor

Posted on 2004-10-06
7
916 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now