unit timerunit_2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, ExtCtrls,Shellapi;
type
Tleer = class(TForm)
loeschen: TAnimate;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
ffile: TAnimate;
folder: TAnimate;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Timer1: TTimer;
Timer2: TTimer;
Timer3: TTimer;
Timer4: TTimer;
Timer5: TTimer;
ProgressBar1: TProgressBar;
Timer6: TTimer;
Timer7: TTimer;
Timer8: TTimer;
Timer9: TTimer;
Timer10: TTimer;
Label8: TLabel;
Timer11: TTimer;
Button1: TButton;
Label9: TLabel;
procedure Timer1Timer(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure Timer3Timer(Sender: TObject);
procedure Timer4Timer(Sender: TObject);
procedure Timer5Timer(Sender: TObject);
procedure Timer6Timer(Sender: TObject);
procedure Timer7Timer(Sender: TObject);
procedure Timer8Timer(Sender: TObject);
procedure Timer9Timer(Sender: TObject);
procedure Timer10Timer(Sender: TObject);
procedure Timer11Timer(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
leer: Tleer;
implementation
uses timerunit, timerunit_3;
{$R *.dfm}
procedure Tleer.Timer1Timer(Sender: TObject);
begin
leer.Height:=244;
folder.Visible:=true;
label5.visible:=true;
end;
procedure Tleer.Timer2Timer(Sender: TObject);
begin
folder.Visible:=false;
label5.visible:=false;
ffile.Visible:=true;
label6.Visible:=true;
end;
procedure Tleer.Timer3Timer(Sender: TObject);
begin
timer1.Enabled:=true;
end;
procedure Tleer.Timer4Timer(Sender: TObject);
begin
timer2.Enabled:=true;
timer1.Enabled:=false;
timer3.Enabled:=false;
end;
procedure Tleer.Timer5Timer(Sender: TObject);
begin
leer.Height:=335;
timer2.Enabled:=false;
timer4.Enabled:=false;
label7.Visible:=true;
ffile.Visible:=false;
label6.Visible:=false;
loeschen.Visible:=true;
progressbar1.Visible:=true;
progressbar1.stepit;
timer6.enabled:=true;
timer7.enabled:=true;
timer8.enabled:=true;
timer9.enabled:=true;
end;
procedure Tleer.Timer6Timer(Sender: TObject);
begin
progressbar1.StepIt;
end;
procedure Tleer.Timer7Timer(Sender: TObject);
begin
progressbar1.StepIt;
end;
procedure Tleer.Timer8Timer(Sender: TObject);
begin
progressbar1.StepIt;
end;
procedure Tleer.Timer9Timer(Sender: TObject);
begin
progressbar1.StepIt;
end;
procedure Tleer.Timer10Timer(Sender: TObject);
begin
leer.height:=140;
loeschen.Visible:=false;
progressbar1.Visible:=false;
timer6.enabled:=false;
timer7.enabled:=false;
timer8.enabled:=false;
timer9.enabled:=false;
label7.Visible:=false;
label3.Visible:=false;
label4.Visible:=false;
label1.Visible:=false;
label2.visible:=false;
label8.Visible:=true;
end;
procedure Tleer.Timer11Timer(Sender: TObject);
begin
form2.show;
leer.Hide;
end;
procedure Tleer.Button1Click(Sender: TObject);
var
Operation : TSHFileOpStruct;
FileName : String;
begin
FileName := 'c:\windows\test.dat'; { zu loeschende Datei }
Filename := Filename + #0; { zweite 0 }
with Operation do
begin
wnd := Form1.Handle;
wFunc := FO_Delete;
pFrom := PChar(FileName);
pto := nil;
{ in den Papierkorb verschieben / keine
Sicherheitsabfrage }
fFlags := FOF_AllowUndo or FOF_NoConfirmation;
end;
SHFileOperation(Operation);
end;
end.