Registriert seit: 17. Feb 2007
Ort: NRW
420 Beiträge
Delphi 2010 Professional
|
Re: Icon Extract zu PNG
6. Jul 2009, 22:42
Hi,
ich hoffe das ist was du suchst:
Delphi-Quellcode:
function IconFromFile(const Filename: String; IconNr: Word): HICON;
var
buffer: array[0..2*MAX_PATH]of Char;
begin
StrPCopy(buffer, Filename);
Result := ExtractAssociatedIcon(HInstance, buffer, IconNr);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Image1.Picture.Icon.Handle := IconFromFile('C:\WINDOWS\NOTEPAD.EXE',0);
end;
Sebastian
|