Herhangi bir program dosyasinda kullanilan ikonun, alinmasini saglayan bir fonksiyon.
implementation
USES ShellApi;
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
IconIndex : word;
h : hIcon;
begin
IconIndex := 0;
h :=
ExtractAssociatedIcon(hInstance,
'C:\WINDOWS\NOTEPAD.EXE',
IconINdex);
DrawIcon(Form1.Canvas.Handle,
10,
10,
h);
end;
end.