Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ImageList TransparentColor

Posted on 2004-10-06
7
Medium Priority
?
954 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 4

Accepted Solution

by:
Jigit earned 1000 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 1000 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
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 …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

704 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