[Lazarus] Hook TComponent streaming system
Mattias Gaertner
nc-gaertnma at netcologne.de
Mon May 24 11:42:49 CEST 2010
On Sun, 23 May 2010 23:37:29 -0300
Luiz Americo Pereira Camara <luizmed at oi.com.br> wrote:
> Mattias Gaertner escreveu:
>[...]
> Here's the actual code (calls a generic TForm descendant):
>
> The article: http://lazarusroad.blogspot.com/
The article does not explain why the properties must be set before
calling Loaded.
> function ShowForm(FormClass: TFormClass; Owner: TWinControl;
> FormProperties: array of const): TModalResult;
> var
> Form: TForm;
> begin
> Form := FormClass.Create(Owner);
> try
> SetObjectProperties(Form, FormProperties);
> Form.Perform(CM_INIT, 0, 0);
> Result := Form.ShowModal;
> finally
> Form.Destroy;
> end;
> end;
Mattias
More information about the Lazarus
mailing list