Alpha channel

  • Thread starter Thread starter Lespaul36
  • Start date Start date
L

Lespaul36

I want to extract associated folder icons durring runtime and show them in a
treeview control. The XP alpha channel messes that up. Is there a fix or a
way to remove the alpha channel?
 
Thanks for the reply, but still having prob. It works fine if I save the
icon to the imagelist and then clean it and display it in a picture box.
but I can't seem to clean it to use on a treeview control. It is a little
better, but still has a border, but I think it is blue.
"Mick Doherty"
 
That's a problem with the Imagelist control. Sorry, but I don't know of a
solution.
Maybe an API created Imagelist will behave better.
 
Is there a way to programically make it white or something. I don't need it
to be transparent. I have tried to add a manifest and it helped a bit, now
the poblem is mostly at the top of the icon.

I sure hope they come out with a control update that will fix this.
"Mick Doherty"
 
I have been trying to make a imagelist with APIs..is there a tutorial
anywhere. I am not having much luck finding one.

TIA
 
I just tried it out and the Icon draws OK in a Treeview Control from an
ImageList, but not on some other controls such as Label.

Have you set the ImageList's ColorDepth to Depth32Bit?
Are VisualStyles Enabled in your App?
 
I have the imagelist ColorDepth set to Depth32Bit
I added the line Application.EnableVisualStyles() to the load event of my
usercontrol. still the same thing am I missing anyting?

I am a bit new to the .Net side sorry for all the questions.
Thanks again.
"Mick Doherty"
 
Lespaul36 said:
I have the imagelist ColorDepth set to Depth32Bit
I added the line Application.EnableVisualStyles() to the load event of my
usercontrol. still the same thing am I missing anyting?

I am a bit new to the .Net side sorry for all the questions.
Thanks again.

Application.EnableVisualStyles should be in Sub Main(). It should be the
first method called by your application, it is not meant for user controls.

Add the following to the Main Form of your application replacing MainForm
with the name of your startup form which would be Form1 by default.

Shared Sub Main()
Application.EnableVisualStyles()
Application.DoEvents()
Application.Run(New MainForm)
End Sub
 
Back
Top