Solved

Transparent  and treeview

Posted on 2001-07-05
7
972 Views
Last Modified: 2008-02-01
Hi EEs:

This is the scenario:

I have a treeview and imagelist controls.
Imagelist is loaded with transparent gifs images.

Why those images haven't transparent background when are seeing on treeview?

Thanks

0
Comment
Question by:Richie_Simonetti
[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
7 Comments
 
LVL 3

Accepted Solution

by:
TheRedGuy earned 50 total points
ID: 6258888
Dunno, can you not just convert the gifs to icons?
0
 
LVL 3

Expert Comment

by:CesarGon
ID: 6259000
You have to set the ImageList's MaskColor property to the color in your GIF images you want to see as "transparent" when used on the TreeView. It won't take the transparency settings of the GIF files.

Best,
Cesar.
0
 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6259014
What colour is the background when they are in the TreeView ?

If it always the same then in your image list control
in the Color tab change the mask color to the color of the background.

Hope this helps
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6259086
In your ImageList load the gif images and set the mask color to the background color that it appears as in the imagelist (usually black). Make sure the UseMaskColor option is checked.

The pictures should now appear as transparent in your TreeView.

Vin.
0
 
LVL 16

Author Comment

by:Richie_Simonetti
ID: 6259462
Well, i already tried Usemaskcolor property without solve the problem.
VincentLawlor, i would reject your answer until i have received more input from others EE.

At the momment of posting question, i had this:
All Gif background are &HFF00FF (Nice color, isn't it?) and all are 256 color depth, loaded to imagelist at design time.
Maskcolor = &HFF00FF
UseMaskColor=true

By the way, i am working with those controls from within VBA.

Thanks for yours comments, i am waiting...
0
 
LVL 16

Author Comment

by:Richie_Simonetti
ID: 6259838
TheRedGuy, your comment is close enought.
I would like to know why it doesn't works with gif.
0
 
LVL 16

Author Comment

by:Richie_Simonetti
ID: 6261579
I don't like to use BMPs simbce they are so heavy. I was using gif instead for that reason.
Ico files are less weight than BMP and it works.
TheRedGuy you have the answer. Thanks
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

691 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