Код:
type
TForm2 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
constructor Create(TickCount: Integer); reintroduce; overload;
constructor Create(AOwner: TComponent; TickCount: Integer); reintroduce; overload;
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
constructor TForm2.Create(TickCount: Integer);
begin
inherited Create(Application);
Caption:=IntToStr(TickCount);
end;
constructor TForm2.Create(AOwner: TComponent; TickCount: Integer);
begin
inherited Create(AOwner);
Caption:=IntToStr(TickCount);
end;
использование:
Код:
if not Assigned(Form2) then Form2:=TForm2.Create(GetTickCount);
Form2.Show;
либо:
Код:
if not Assigned(Form2) then Form2:=TForm2.Create(Self, GetTickCount);
Form2.Show;
см. в справке
reintroduce и
overload (в случае 2-х конструкторов)