Hi AdmiralGanja,
I don’t know how you set the icon of the ListView items. I think this problem might be caused by the ColorDepth. Here is my code to set the icon of the three items in my test ListView.
Code Snippet
partial class Form1 : Form
{
private ImageList imgList = new ImageList();
public Form1()
{
InitializeComponent();
Image img = Image.FromFile(@"D:\icon.bmp");
imgList.Images.Add(img);
imgList.ImageSize = new Size(100, 100);
imgList.ColorDepth = ColorDepth.Depth32Bit;
listView1.LargeImageList = imgList;
listView1.Items[0].ImageIndex = 0;
listView1.Items[1].ImageIndex = 0;
listView1.Items[2].ImageIndex = 0;
}
When I set the ColorDepth property of the ImageList to Depth32Bit, it looks greate event the size is very big (100X100). But system will use Depth8Bit as default value if you don’t set it. Then the icon looks really ugly when it is larger.
Please try that and tell me if it works.
Sincerely,
Kira Qian |