Registriert seit: 22. Nov 2004
Ort: Lübeck
202 Beiträge
Delphi 2005 Architect
|
Re: Fenster in Programm öffnen.
30. Dez 2004, 00:58
Also gut. Hier anhand eines Beispiels:
Code für Unit 1:
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses unit2;
procedure TForm1.Button1Click(Sender: TObject);
begin
form2.Show;
end;
end.
und hier für Unit2:
Delphi-Quellcode:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm2 = class(TForm)
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
uses unit1;
end.
|
|
Zitat
|