unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Menus, JPEG,ShellAPI, GifImage, FileCtrl, ExtDlgs;
type
TForm4 =
class(TForm)
Panel1: TPanel;
Button4: TButton;
FileListBox1: TFileListBox;
Timer1: TTimer;
GroupBox1: TGroupBox;
Button2: TButton;
Button3: TButton;
Button5: TButton;
GroupBox2: TGroupBox;
Button6: TButton;
Button1: TButton;
Button7: TButton;
OpenDialog1: TOpenDialog;
Button10: TButton;
Button9: TButton;
Label1: TLabel;
Image1: TImage;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
CheckBox1: TCheckBox;
Label5: TLabel;
Panel3: TPanel;
Panel4: TPanel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure FormPaint(Sender: TObject);
procedure FileListBox1Change(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
private
n :integer;
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form4: TForm4;
implementation
uses Unit2, Unit8, Unit3, Unit9;
{$R *.dfm}
{Schließen}
procedure TForm4.Button4Click(Sender: TObject);
begin
Form4.Close;
Form2.Visible:= True;
end;
procedure TForm4.FormShow(Sender: TObject);
var i :integer;
begin
n:= 2000;
// Strart interval des Timers
for i:=0
to ComponentCount-1
do // XP Anzeige
if Components[i]
is TPanel
then (Components[i]
as TPanel).ParentBackground:= False;
FileListBox1.Directory:= ExtractFilePath(ParamStr(0))+'
\Bilder\';
end;
{Ordner Anzeige}
procedure TForm4.FileListBox1Change(Sender: TObject);
var bild :
string;
begin
bild:= LowerCase(ExtractFileExt(FileListBox1.Filename));
if (bild = '
.jpg')
then // Laden von JPG
begin
Image1.Picture.RegisterFileFormat('
jpg', '
Jpeg', TjpegImage);
Image1.Picture.LoadFromFile(FileListBox1.FileName);
end;
end;
{Zeit des Durchlaufs}
procedure TForm4.Timer1Timer(Sender: TObject);
var bild,i :
string;
begin
if FileListBox1.Items.Count > 0
then
begin
if FileListBox1.ItemIndex+1 <> FileListBox1.Items.Count
then
begin
i:= FileListBox1.Items[FileListBox1.Itemindex+1];
// hochzählen der datein
FileListBox1.Filename:= i;
bild:= Lowercase(ExtractFileExt(FileListBox1.Filename));
if (bild = '
.jpg')
then
begin
Image1.Picture.RegisterFileFormat('
jpg', '
Jpeg', TjpegImage);
Image1.Picture.LoadFromFile(FileListBox1.Filename);
end;
if (bild = '
.jpg')
then
begin
Form3.Image1.Picture.RegisterFileFormat('
jpg', '
Jpeg', TjpegImage);
Form3.Image1.Picture.LoadFromFile(FileListBox1.Filename);
end;
end
else
begin
i:= FileListBox1.Items[0];
FileListBox1.Filename:= i;
end;
end;
end;
{Durchlaufs anhalten}
procedure TForm4.Button3Click(Sender: TObject);
begin
Timer1.Enabled:= False;
end;
{Durschlaufstarten}
procedure TForm4.Button2Click(Sender: TObject);
begin
Timer1.Enabled:= True;
end;