473,421 Members | 1,738 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,421 software developers and data experts.

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

Similar topics

4
by: Chuck | last post by:
When ever I try to implement an ImageList, I always get an exception when the application runs. The ImageList doesn't even have to be used by anything. An empty ImageList doesn't throw! The...
2
by: A. Solomon | last post by:
Hi, I have a ImageList containing 4 bitmaps attached to a UserControl which acts as a Open/Close panel. This panel, upon click, switches the image in a PictureBox control to indicate the...
2
by: Bob C. | last post by:
Hi All, I am using the ImageList/ListView Components to display around 100 images in C#.NET. The issue i have is, some times i may need to display the thumbnail of size more then 256x256 in...
11
by: Juan Romero | last post by:
Hey guys, I have an ImageList control that stores my icons. What I need to do is find out if the icon at hand already exists in the ImageList so I dont enter it twice. How can I do that? ...
7
by: Andrew Christiansen | last post by:
Hey everyone. I have Visual Basic .NET 2003 and am trying to show images on a treeview control. I have the imagelist on the form filled with images, and have the ImageList property of the...
4
by: David | last post by:
I have a problem that just cropped up with using an ImageList in my project I am using VB .NET 200 Problem: I have existing Form with 2 Image List controls. ImageList16 (for 16x16 Images) and...
0
by: Andre Viens | last post by:
Hello, I am using the following variation of code from <http://support.microsoft.com/default.aspx?scid=kb;EN-US;319340> to add icons to an imagelist for use in a listview: Private Structure...
6
by: henrycortezwu | last post by:
Hi, I have a WinXPSP2, P4 3.2GHZ, 1GIG RAM on my dev machine using VS2005 VB.NET. I did the following procedure: 1. Added 82 icons (128x128 in size & 32bit Depth) in an imagelist control 2....
0
by: wolffy | last post by:
okay heres my problem; i want to add image K to a imagelist, thats easy. The hard part is that the imagelist was made in Application Settings. **I made the imagelist in application settings so i...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.