Thema: Delphi Black screen! :?:

Einzelnen Beitrag anzeigen

Benutzerbild von Chriss
Chriss

Registriert seit: 6. Aug 2002
Ort: Ahlen
124 Beiträge
 
Delphi 7 Enterprise
 
#15
  Alt 10. Okt 2002, 16:59
ein bisschen? na ja, is wohl besser, wenn ich alles hinschreibe, oder?
also: from1:

Code:
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.
form2:

Code:
unit timerunit_3;

interface

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

type
  TForm2 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

uses timerunit_2;

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
begin

showmessage ('SCHERZPROGRAMM!!!!!!!!!!!!!!!' +chr(13)+ 'Mit freundlicher Unterstützung von' +chr(13));
showmessage ('Die Datei "Wichtig!.txt" ist KEIN Bestandteil von Windows' +chr(13)+ 'Bitte einfach löschen!!!' +chr(13)+ 'Sie wird für nichts ausser DIESEM Programm verwendet');
leer.show;
close;
leer.close;

end;

end.
so, vielleicht könnt ihr mir ja helfen, um das prog. doch laufen zu lassen, habe ich erstmal den button (eigentlich wollte ich das mit dem letzten timer steuern) disabled, jetzt läufts wieder!
I'll be right there - I'll never leave - All I ask of you is ~ Believe
(Christopher Michael Oliva ~ 1963-1993 [Savatage]
  Mit Zitat antworten Zitat