unit uBench;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, ImgList;
type
TForm1 =
class(TForm)
Start: TButton;
FigurListe: TImageList;
Image1: TImage;
Label1: TLabel;
Timer1: TTimer;
procedure StartClick(Sender: TObject);
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Bild : TBitmap ;
BildName :
string ;
Punkte : integer ;
Zeit : integer ;
implementation
{$R *.dfm}
procedure TForm1.StartClick(Sender: TObject);
var
i : integer ;
begin
for i := 1
to 2
do
begin
Bild.LoadFromFile(ExtractFilePath(Application.Exename)+IntToStr(i)+'
.bmp');
Bild.Width := 1612 ;
Bild.Height := 1081 ;
FigurListe.Width := 1612 ;
FigurListe.Height := 1081 ;
FigurListe.Masked := false ;
FigurListe.Add(Bild,
nil)
end;
Timer1.Enabled := true ;
for i := 1
to 50
do
begin
FigurListe.GetBitmap(0, Image1.Picture.Bitmap) ;
repaint ;
FigurListe.GetBitmap(1, Image1.Picture.Bitmap) ;
repaint ;
end;
Timer1.Enabled := false ;
Label1.Caption := IntToStr(Zeit) ;
end;
procedure TForm1.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
FigurListe.Free ;
Bild.Free ;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
FigurListe := TImageList.Create(self);
Bild := TBitmap.Create ;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Zeit := Zeit + 1 ;
end;
end.