unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm2 =
class(TForm)
Label1: TLabel;
Timer1: TTimer;
Button1: TButton;
//enabled auf false
procedure Timer1Timer(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Timer1Timer(Sender: TObject);
begin
close;
end;
procedure TForm2.FormShow(Sender: TObject);
begin
timer1.Enabled:=true;
end;
procedure TForm2.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action:=caFree;
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
close;
end;
end.