Hier die Lösung, man Gibt den Pfad eines Icons an und bekommt ein TBitmap zurück:
Delphi-Quellcode:
function icotobmp(filename: string): tbitmap;
var
Icon: TIcon;
begin
Icon := TIcon.Create;
result := TBitmap.create;
try
Icon.LoadFromFile(filename);
result.Width := Icon.Width;
result.Height := Icon.Height;
result.Canvas.Draw(0, 0, Icon);
finally
Icon.Free;
end;
end;
[edit=flomei] Mfg, flomei[/edit]