472,378 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,378 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 3875
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...
0
by: F22F35 | last post by:
I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent...

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.