473,320 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Alpha channel

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
10 2682
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
* "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
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
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
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
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
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sam Fisher | last post by:
Hi, I'm currently using a ListView- control in my VB.NET app, that shall look nice and therefore contains some 24 bit icons (plus 8 bit alpha channel). But the icons are not displayed correctly in...
3
by: Bill English | last post by:
Does C# Support Alpha Channel Backgrounds? I have an image made in Photoshop, which has an alpha channel. I save it as a PNG file, then set the form's BG image to that file. Now it shows up fine...
3
by: instruo | last post by:
I'm using the System.Drawing.Bitmap class for loading a 32-bit bmp file which includes an alpha channel. The problem is, when it gets loaded (just using the Bitmap(string filename) constructor),...
0
by: morten skrubbeltrang | last post by:
According to KB article 822488 http://support.microsoft.com/default.aspx?scid=kb;en-us;822488 visual c# .net 2002 + 2003 has bug in rendering of alpha channel information when displaying a...
1
by: RicercatoreSbadato | last post by:
I have notice that my images have the value Image.Flags = 2 (HasAlpha). How Can I set the Flags to 1? I would like to eliminate the alpha channel... -- RicercatoreSbadato
2
by: Allan | last post by:
I've been trying to get this to work for days. I have a form which needs to be transparent (only the form background). On the form there are two images (32 bit PNGs) with alpha channel...
1
by: André Nogueira | last post by:
Hi there guys. I have some 32 Bits PNGs with an Alpha channel, and added them as icons on Toolbar buttons. However, the pixels affected by the Alpha channel (those that have some transparency)...
0
by: yxq | last post by:
Hello, I use the API ExtractIcon to get icon from Shell32, but the returned icon lost alpha channel, how get back the alpha channel? thank you. ...
6
by: tommaso.gastaldi | last post by:
In a previous post I have been asking about a way to test Alpha Transparency. Bob and Michael have kindly provided some ideas. Here I would like to share the function I have prepared, for the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.