AW: Formular neu createn?
19. Apr 2017, 21:31
Das geht so:
Delphi-Quellcode:
program Project1;
uses
Vcl.Forms,
Unit1 in ' Unit1.pas' {Form1},
Unit2 in ' Unit2.pas' {Form2};
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm1, Form1);
// Application.CreateForm(TForm2, Form2);
Application.Run;
end.
----------------------
procedure TForm1.Button1Click(Sender: TObject);
begin
Application.CreateForm(TForm2, Form2);
Form2.Show;
end;
----------------------
procedure TForm2.Button1Click(Sender: TObject);
begin
Close;
Self.Free;
end;
----------------------
Geändert von t.roller (19. Apr 2017 um 22:09 Uhr)
|