unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, ShellFunctions, ShellAPI;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    txtFile: TEdit;
    cmbBrowse: TButton;
    GroupBox1: TGroupBox;
    GroupBox2: TGroupBox;
    OpenDialog: TOpenDialog;
    cmbLoadIcon: TButton;
    imgLarge: TImage;
    imgSmall: TImage;
    procedure cmbLoadIconClick(Sender: TObject);
    procedure cmbBrowseClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.cmbLoadIconClick(Sender: TObject);
begin
  //Определение большой и малой иконок файла
  imgLarge.Picture.Icon.Handle := GetFileIcon( txtFile.Text );
  imgSmall.Picture.Icon.Handle := GetFileIcon( txtFile.Text, True );
end;

procedure TForm1.cmbBrowseClick(Sender: TObject);
begin
  if OpenDialog.Execute then
    txtFile.Text := OpenDialog.FileName;
end;

end.
