如何能在listview里绘制SystemIcons里的所有Icon

解决方案 »

  1.   

    有人会吗,在Listview里也可以
      

  2.   

                imageList1.Images.Add(SystemIcons.Error);
                listView1.LargeImageList = imageList1;
                listView1.Items.Add(String.Empty);
                listView1.Items[0].ImageIndex = 0;
      

  3.   


                ImageList _ImageList = new ImageList();
                _ImageList.ImageSize = new Size(32, 32);
                _ImageList.ColorDepth = ColorDepth.Depth32Bit;
                System.Reflection.PropertyInfo[] _PropertyList = typeof(SystemIcons).GetProperties();
                listView1.View = View.LargeIcon;
                listView1.LargeImageList = _ImageList;            foreach (System.Reflection.PropertyInfo _Property in _PropertyList)
                {                _ImageList.Images.Add(_Property.Name, (Icon)_Property.GetValue(null, new object[] { }));
                    listView1.Items.Add(_Property.Name, _Property.Name, _Property.Name);
                }