--------------------------------
program MeinProgramm;
uses
Forms,
Haupt in 'Haupt.pas' {Form1},
Fenster1 in 'Fenster1.pas' {Form2},
Fenster2 in 'Fenster2.pas' {Form3};
{$R *.RES}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
--------------------------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if Form2.Visible = true then
Application.CreateForm(TForm2, Form2);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Application.CreateForm(TForm3, Form3);
end;
end.