Delphi OnCreate: strange behaviour while creating a form

Viewed 182

I am still using Delphi 10.3.3

I have my own form class

TMyForm = class( tForm )
public
  constructor Create(AOwner: TComponent); override;
end;

{ ... }

constructor TMyForm.Create(AOwner: TComponent);
begin
  { code block A }
  inherited Create(AOwner);
  { code block B }
end;

I have about 200 forms - but some behave differently than the other and I have no clue why.

In general the code block A will be executed, then the code within the OnCreate of my forms and then code block B.

But for some reason some forms execute the code in following order: code block A, code block B and then OnCreate.

I know that this is very little information. But I have no idea where could I look for the reason of the different behaviour or what other information should I provide.

0 Answers
Related