你装这个软件吧。Axialis IconWorkshop v5.02  5M 英文版
很强的一个图标提取编辑软件。能把exe中的图标提出来。
另外,很多系统图标都在%SystemRoot%\system32\SHELL32.dll中

解决方案 »

  1.   

    我是想用程序得到文件的关联图标,比如doc或zip类型的图标,然后加到ImageList控件里(程序自动),然后在使用它。
    不知道可不可以?
      

  2.   

    用ExtractIcon来提取图标,然后用DrawIcon来画出图标
      

  3.   

    用ExtractAssociatedIcon吧。
    下面的代码可以得到不同的图标。
    Option Explicit
    Private Declare Function ExtractAssociatedIcon Lib "shell32.dll" Alias "ExtractAssociatedIconA" (ByVal hInst As Long, ByVal lpIconPath As String, lpiIcon As Long) As Long
    Private Declare Function DrawIcon Lib "user32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As LongPrivate Sub Command1_Click()
        Dim lngIcon As Long
        lngIcon = ExtractAssociatedIcon(App.hInstance, "c:\boot.ini", 0)
        DrawIcon Picture1.hdc, 0, 0, lngIcon
    End SubPrivate Sub Command2_Click()
        Dim lngIcon As Long
        lngIcon = ExtractAssociatedIcon(App.hInstance, App.Path & "\" & App.EXEName & ".vbp", 0)
        DrawIcon Picture1.hdc, 0, 0, lngIcon
    End Sub注意ExtractAssociatedIcon在API浏览器中声明的有错误,应该用上面的声明
      

  4.   

    Retrieves information about an object in the file system, such as a file, a folder, a directory, or a drive root.WINSHELLAPI DWORD WINAPI SHGetFileInfo(    LPCTSTR pszPath, 
        DWORD dwFileAttributes, 
        SHFILEINFO FAR *psfi, 
        UINT cbFileInfo, 
        UINT uFlags );uFlags=SHGFI_SYSICONINDEX or SHGFI_LARGEICON