Code:uses shellApi; procedure TForm1.Button1Click(Sender: TObject); const ExtrFileName = {Enter FileName.dll here}; var icon: TIcon; NumberOfIcons, i: Integer; begin icon := TIcon.Create; try // Get the number of Icons NumberOfIcons := ExtractIcon(Handle, PChar(ExtrFileName), UINT(-1)); ShowMessage(Format('%d Icons', [NumberOfIcons])); // Extract the first 5 icons of DLL for i := 1 to 5 do begin // Extract an icon icon.Handle := ExtractIcon(Handle, PChar(ExtrFileName), i); // Draw the icon on your form DrawIcon(Form1.Canvas.Handle, 10, i * 40, icon.Handle); end; finally icon.Free; end; end;





Reply With Quote