473,729 Members | 2,348 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ListView Icon color depth

hi,
I have a problem displaying icons at the right colour depthin a
ListView.

I've made an icon file, (using IconWorkshop 5), it has 3 icons within
it. A 32x32 32bpp XP style icon, a 32x32 32bpp non-xp icon (no
transparency), and a 16x16 version.

I add these icons to an ImageList, which is then assigned to the
LargeImageList property of the ListView.

The list view dislays the XP-style icon even on Win2k. I would like to
be able to tell it to display the non-xp version of the icon.

I've tried setting the "ColorDepth " property of the ListView- but it
seems to make no difference.

In Windows File Explorer they display correctly (ie, on win2k it shows
the non-xp icon).

It also seems to slightly distort the image - (it seems to take the XP
icon, and convert its colour depth)- , compared to the Windows
Explorer version.

Any ideas? I'm getting desparate.

Thanks,
David.
Nov 16 '05 #1
3 6577
Hi scoobydoo,

As i remeber, if you want to change color depth of images in
ImageList, then you should set ImageList's ColorDepth before
you add these images.

AFAIK ListView does not have any property like "ColorDepth ".

Marcin
hi,
I have a problem displaying icons at the right colour depthin a
ListView.

I've made an icon file, (using IconWorkshop 5), it has 3 icons within
it. A 32x32 32bpp XP style icon, a 32x32 32bpp non-xp icon (no
transparency), and a 16x16 version.

I add these icons to an ImageList, which is then assigned to the
LargeImageList property of the ListView.

The list view dislays the XP-style icon even on Win2k. I would like to
be able to tell it to display the non-xp version of the icon.

I've tried setting the "ColorDepth " property of the ListView- but it
seems to make no difference.

In Windows File Explorer they display correctly (ie, on win2k it shows
the non-xp icon).

It also seems to slightly distort the image - (it seems to take the XP
icon, and convert its colour depth)- , compared to the Windows
Explorer version.

Any ideas? I'm getting desparate.

Thanks,
David.

Nov 16 '05 #2
Hi David,

Only simple solution i see is:

1. Create a second ImageList with wanted ColorDepth
2. Copy all images from first into a second one.

I didn't test it, so if there will be any proplems
then let me know. Personaly i don't know how it will
work with TransparentColo r?

Cheers!

Marcin
Hi,
Thank you for your reply.

I meant the ColorDepth property of the ImageList, not the List View, sorry.

The icons are embeeded resources, and are loaded :
Icon myIcon = new Icon(GetType(), "myico.ico" );

I set the ImageSize, ColorDepth and Transparency properties of the Imagelist
before adding the icon to it.

Any clues,
TIA,
David

Nov 16 '05 #3
Hi,
Thank you for your reply.

I meant the ColorDepth property of the ImageList, not the List View, sorry.

The icons are embeeded resources, and are loaded :
Icon myIcon = new Icon(GetType(), "myico.ico" );

I set the ImageSize, ColorDepth and Transparency properties of the Imagelist
before adding the icon to it.

Any clues,
TIA,
David
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6021
by: Matthias Kwiedor | last post by:
I have a Listview in Detail Mode. No i create lines with ListViewItem lvwItem = new ListViewItem(); lvwItem = new System.Windows.Forms.ListViewItem(new System.Windows.Forms.ListViewItem.ListViewSubItem { new System.Windows.Forms.ListViewItem.ListViewSubItem(null, "text1", System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular,...
3
14891
by: Marc W. | last post by:
Hello, I am trying to create a ListView object on my form with two columns. A small, 32 pixel wide column on the left for holding images, and a column that takes up the rest of the ListView on the right for storing text. My question is this: how do I store images in this first column? I see all kinds of support for small icon images and large icon images, but those are for views that I do not want. Is there any way to do this?
2
4730
by: Anushya devi | last post by:
Hi All I used listview and tried to update it by using Addrange. When the number of items is less, it works fine.. But I need to update nearly 200,000 items and it hangs. Also i need to add images to listview also(This is to list all the items in my inbox, and want to give the user the feel of outlook). Since it hangs for even 1000 items in the inbox, i tried to shift to virtual listview. But virtual listview
0
1141
by: scoobydoo | last post by:
Can anybody tell me how to define which icon is displayed in a listView? I'm writing in c#. My implementation ALWAYS uses the windows XP version of the icon within the ..ico file. I would like it to use a different color-depth-version, but cannot find a way to specify this. I've tried setting the ColorDepth property of the LargeImageList, but it appears to make no difference.
1
15090
by: Víctor | last post by:
I'm doing a kind of file explorer with some additional funcionalities. The problem is that I'm not able to draw file extension icons in a ListView. I know how obtain icons, but when I try to draw file icon, this isn't showed. I tried to do by two ways: 1- By creating the ListViewItem and adding it to ListView, then I get rectangle of icon element and paint a new icon in rectangle coordenates. I'm able to view icons while they are...
3
1368
by: OpticTygre | last post by:
Are there any good tutorials out on the net that explains the listview control with great detail? Things like drag-drop features, icon additions, etc...?
3
2255
by: Maarten | last post by:
hi all, is there a way to show the icons of a file, used by the system in a listview. now i have something like: Private Sub AddFiles(ByVal nod As TreeNode) Dim strPath As String = nod.FullPath
2
7532
by: Joe | last post by:
Anyone can suggest the best method of reading XML and adding data to ListView? Here is the xml data structure:: <xml> <site> <url>http://www.yahoo.com</url> <lastupdate></lastupdate> <check>1</check>
3
398
by: koredump | last post by:
Hi, I have an application that's being deployed using ClickOnce. Once deployed and installed on client machine, the form icon that I have added using the designer won't show up in any of the application forms. However, this only occures on one machine running windows 2003 server. Anyone expierance such problem? Any suggestions on how I should approach the problem. TIA, Rich
0
8917
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9281
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9200
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.