By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,022 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Alpha channel

P: n/a
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?
Nov 20 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
http://dotnetrix.co.uk/misc.html -- > Get Alpha Bitmap from 32 bit Icon.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Lespaul36" <le*******@none.net> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
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?

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004
Nov 20 '05 #2

P: n/a
* "Lespaul36" <le*******@none.net> scripsit:
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?


<URL:http://vbaccelerator.com/article.asp?id=4302>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

P: n/a
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"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:OY*************@TK2MSFTNGP09.phx.gbl...
http://dotnetrix.co.uk/misc.html -- > Get Alpha Bitmap from 32 bit Icon.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Lespaul36" <le*******@none.net> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
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?

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004

Nov 20 '05 #4

P: n/a
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.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Lespaul36" <le*******@none.net> wrote in message
news:uT**************@tk2msftngp13.phx.gbl...
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.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004
Nov 20 '05 #5

P: n/a
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"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:OY**************@TK2MSFTNGP12.phx.gbl...
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.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Lespaul36" <le*******@none.net> wrote in message
news:uT**************@tk2msftngp13.phx.gbl...
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.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004

Nov 20 '05 #6

P: n/a
I have been trying to make a imagelist with APIs..is there a tutorial
anywhere. I am not having much luck finding one.

TIA

"Lespaul36" <le*******@none.net> wrote in message
news:em**************@TK2MSFTNGP12.phx.gbl...
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"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in message news:OY**************@TK2MSFTNGP12.phx.gbl...
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.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Lespaul36" <le*******@none.net> wrote in message
news:uT**************@tk2msftngp13.phx.gbl...
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.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004


Nov 20 '05 #7

P: n/a
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?

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004
Nov 20 '05 #8

P: n/a
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"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:ut****************@TK2MSFTNGP09.phx.gbl...
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?

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004

Nov 20 '05 #9

P: n/a
"Lespaul36" <le*******@none.net> wrote in message
news:eh**************@TK2MSFTNGP09.phx.gbl...
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

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004
Nov 20 '05 #10

P: n/a
Thanks for all your help. :) It is working great now!!

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:OB***************@TK2MSFTNGP10.phx.gbl...
"Lespaul36" <le*******@none.net> wrote in message
news:eh**************@TK2MSFTNGP09.phx.gbl...
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

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004

Nov 20 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.