unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ImageEnView, IEMView, StdCtrls, FileCtrl, ImageEnIO, ComCtrls;

type
  TForm1 = class(TForm)
    GroupBox1: TGroupBox;
    DriveComboBox1: TDriveComboBox;
    DirectoryListBox1: TDirectoryListBox;
    ImageEnMView1: TImageEnMView;
    StatusBar1: TStatusBar;
    procedure DirectoryListBox1Change(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure ImageEnMView1MouseMove(Sender: TObject; Shift: TShiftState;
      X, Y: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses GIFLZW, TIFLZW;

{$R *.DFM}

procedure TForm1.DirectoryListBox1Change(Sender: TObject);
var
	sr:TSearchRec;
   Found,idx:integer;
   fpath:string;
begin
	ImageEnMView1.Clear;
	Found:=FindFirst(DirectoryListBox1.Directory+'\*.*',faArchive,sr);
   while Found=0 do begin
   	fpath:=DirectoryListBox1.Directory+'\'+sr.Name;
   	if FindFileFormat(fpath,true)<>ioUnknown then begin
         idx:=ImageEnMView1.AppendImage;
         ImageEnMView1.ImageFileName[idx]:=fpath;
      end;
   	//
      Found:=FindNext(sr);
   end;
   FindClose(sr);
end;

procedure TForm1.FormActivate(Sender: TObject);
begin
   DefGIF_LZWDECOMPFUNC:=GIFLZWDecompress;
   DefGIF_LZWCOMPFUNC:=GIFLZWCompress;
   DefTIFF_LZWDECOMPFUNC:=TIFFLZWDecompress;
   DefTIFF_LZWCOMPFUNC:=TIFFLZWCompress;
end;

procedure TForm1.ImageEnMView1MouseMove(Sender: TObject;
  Shift: TShiftState; X, Y: Integer);
var
	idx:integer;
begin
	idx:=ImageEnMView1.ImageAtPos(x,y);
   if idx>=0 then
		StatusBar1.SimpleText:=ImageEnMView1.ImageFileName[ idx ];
end;

end.
