提取文件图标

procedure TForm1.btn3Click(Sender: TObject);
var
FileName: AnsiString;
begin
  if OpenDialog1.Execute then
FileName := OpenDialog1.FileName ;
img1.Picture.Icon.Handle :=
ExtractIcon(Hinstance, pchar(FileName), 0);
end;

本文出自 “601880” 博客,转载请与作者联系!

你可能感兴趣的:(职场,休闲)