c# 中添加系统中应用程序 快捷方式?????
实现效果,点击一个按钮在系统找对应的系统程序 然后添加快捷方式  一个listview中去我试过 在里面加image  但报错!!!
帮帮忙谢谢了!!!

解决方案 »

  1.   

    看了你写的内容,貌似和标题不符。
    想实现一个文件列表么?
    首先用API获得文件显示图标,然后添加到一个ImageList中,对这个项设置ImageListIndex为对应的编号。
      

  2.   

    [DllImport("shell32.DLL", EntryPoint = "ExtractAssociatedIcon")]
      private static extern int ExtractAssociatedIconA(int hInst, string lpIconPath, ref int lpiIcon); 
    获取图标
    参考
      

  3.   

    就是listview里面 添加一项 
    你可以往listview里面添加对应程序的图标 
    从listviewITem 继承下来 添加一个属性 programPath
    这个字段保存应用程序的地址点击的时候 响应事件 click 对应地址的程序