procedure TForm1.Button1Click(Sender: TObject);
begin
  if OpenDialog1.Execute then
    GetIcons(OpenDialog1.FileName);
end;procedure TForm1.GetIcons(const FileName: string);
var
  index, iCount: integer;
  icon: Ticon;
begin
  index := -1;
  iCount := ExtractIcon(Hinstance, Pchar(FileName), index);
  Icon := TIcon.Create;
  for index := 0 to iCount - 1 do
  begin
    Icon.Handle := ExtractIcon(Hinstance, Pchar(FileName), index);
    ImageList1.AddIcon(Icon);
    with ListView1.Items.Add do
    begin
      Caption := IntToStr(index + 1);
      ImageIndex := ImageList1.Count - 1;
    end;
  end;
end;