ImageList problem

S

sonu

Hi,

I have a problem for use of imagelist.

The problem is I have written a code which returns me the icons
associated with the files depending on their type.

After getting the icon for the file I am adding the icon to the
imagelist and then use its position to display the icon in the
listview.

When I directly associate the icon to the item in the listview
then there is no problem, but if I add the icon to the imagelist
and associate this with the Listview then the icon displayed in the
listview is having a black border appearance.Which is not in the
previous.And it is necessary for me to add the icons in the
imagelist.

What could be the problem?
Is there any solution to the problem.

Thanks in advance
 
C

Carlos J. Quintero [VB MVP]

When you say "black border appearance", do you mean that there is a problem
in the transparency? AFAIK, what you get from the files are bitmaps, not
icons and since bitmaps do not support transparency natively, so have to set
which is the transparent color. ImageLists have a property for that.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
G

Guest

I load icons from embedded resource icon files all time and the transparency
is preserved when is use the imagelist index nos in things like TreeView, etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top