我想把后缀名为.exe文件的图标提取出来,放到控件pictureBox中。请问该怎么做?

解决方案 »

  1.   

    using System.Runtime.InteropServices;[DllImport("shell32.dll")]
    public static extern IntPtr ExtractIcon(IntPtr hInst, 
        string lpszExeFileName, uint nIconIndex);private void button1_Click(object sender, EventArgs e)
    {
        pictureBox1.Image = Icon.FromHandle(
            ExtractIcon(Handle, @"c:\temp\temp.exe", 0)).ToBitmap();
    }
      

  2.   

    搜索下MicroangeloToolset6 这个工具 可以提取图标 还可以进行修改
      

  3.   

    谢谢zswang(伴水清清)(专家门诊清洁工)。