添加一个ImageList控件imageList1,在其Images属性添加你想要的图片或者图标,然后代码:listView1.SmallImageList = this.imageList1;
ListViewItem item = new ListViewItem("test", 0);
item.SubItems.Add("test1");//添加第二列
……
listView1.Items.Add(item);
第一个参数为第一列的文本,第二个参数是图标在ImageList中的index值。

解决方案 »

  1.   

    关键在这里("test", 0);
    0代表imagelist内index的值
      

  2.   

    各位老大,运行是出现以下错误!!错误的行是:这行代码是自动生成的。
    this.imageListMAC.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListMAC.ImageStream")));错误提示是:An unhandled exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dllAdditional information: 未能在给定的程序集中找到任何适合于指定的区域性(或非特定区域性)的资源。请确保已将“frmNeools.resources”正确嵌入或链接到程序集“neools”。
    baseName: frmNeools  locationInfo: neools.frmNeools  resource file name: frmNeools.resources  assembly: neools, Version=1.0.1446.30969, Culture=neutral, PublicKeyToken=null