[Lazarus] Limit to the number of forms in a project?

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Mar 27 23:59:05 CET 2013


Dave Coventry schrieb:
> Hi Kai,
> 
> On 27 March 2013 18:57, K. P. <platysternon at hotmail.com> wrote:
>> Maybe something to do with form auto-creation (Project Oprions -> Forms ->
>> AutoCreate)?
> 
> Yes, I'd assume that, too.
> 
>> Are your forms created at run- or design-time?
> 
> They are created at design time.
> 
> I suppose that I should actually be creating them at run time.

I think that the right question is about automatic form creation (on app 
start) or on demand. I'd let the first form be auto-created, and in its 
FormCreate handler it creates the other form, before using it or its 
components.

The shared components (list...) also better are moved into a common 
unit, where they can be created during program initialization. This 
initialization can reside either in the unit initialization section, or 
in a routine called from a splash screen, or in the main form creation 
handler.

DoDi





More information about the Lazarus mailing list