不就是读取指定文件的图标么,论坛里很多这样的帖子。<br>function TForm1.GetfIcon(const fName: String;<br> var ImgList: TImageList): Boolean;<br>VAr Info: TSHFILEINFO;<br>Flag:Integer;Icon:Ticon;<br>begin<br> Result := False;<br> Icon:=Ticon.Create;<br> Flag:=(SHGFI_LARGEICON or SHGFI_ICON); //大图标<br> try<br> SHGetFileInfo(Pchar(fName),0,info,Sizeof(info),Flag);<br> Icon.Handle :=info.hIcon;<br> ImgList.AddIcon(Icon); //随便<br> Result := True;<br> Finally Icon.Free; end;<br>end;<br>Uses ShObj;