469,271 Members | 1,425 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

ImageList problem

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

Nov 23 '05 #1
2 3790
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

"sonu" <so*************@yahoo.com> escribió en el mensaje
news:11**********************@g49g2000cwa.googlegr oups.com...
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

Nov 23 '05 #2
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.
--
Dennis in Houston
"Carlos J. Quintero [VB MVP]" wrote:
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

"sonu" <so*************@yahoo.com> escribió en el mensaje
news:11**********************@g49g2000cwa.googlegr oups.com...
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


Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Chuck | last post: by
2 posts views Thread by A. Solomon | last post: by
2 posts views Thread by Bob C. | last post: by
11 posts views Thread by Juan Romero | last post: by
7 posts views Thread by Andrew Christiansen | last post: by
6 posts views Thread by henrycortezwu | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.