On Sun, 23 May 2010 23:37:29 -0300
Luiz Americo Pereira Camara <[email protected]> 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

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to