DirectoryInfo dir = new DirectoryInfo(@"D:\image"); foreach (FileInfo file in dir.GetFiles()) { this.imageList1.Images.Add(Image.FromFile(file.FullName)); } for (int j = 0; j < this.imageList1.Images.Count; j++) { ListViewItem item = new ListViewItem(); item.ImageIndex = j; this.listView1.Items.Add(item); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)