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

DrawImage and soft transparencies

P: n/a
Hello everybody,

I'm using the filetype icons of the system. The icons are gotten using
SHGetFileInformation and added to an ImageList (ColorDepth = 32bit).
This works fine when ListViewItems are linked to those icons, even with
soft transparencies. But now I need to draw them in the DrawItem event
of a combobox. The image is drawn to the desired position, but the soft
transparencies appear black and that doesn't look fine. Is there are
workaround to fix this?

The code I'm using:
e.Graphics.DrawImage(SmallImageList.Images(iIndex) , e.Bounds.X + 1, _
e.Bounds.Y + 1)
Thanks in advance,

Stefan

--
___________________________________www.VBTricks.de .vu
the free resource for Visual Basic, Gambas and Pascal
components, tips & complete projects

www: http://www.VBTricks.de.vu
mail: vbtricks <at> gmx <dot> net
__________________________________________________ ___
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"VBTricks.de.vu Webmaster" <no****@thisserverdoesntexist.com> schrieb:
I'm using the filetype icons of the system. The icons are gotten using
SHGetFileInformation and added to an ImageList (ColorDepth = 32bit).
This works fine when ListViewItems are linked to those icons, even with
soft transparencies. But now I need to draw them in the DrawItem event
of a combobox. The image is drawn to the desired position, but the soft
transparencies appear black and that doesn't look fine. Is there are
workaround to fix this?


<URL:http://dotnetrix.co.uk/misc.html>
-> "Get Alpha Bitmap from 32 bit Icon."

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.