[fpc-pascal] Application.onChangeComponentCount ?

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jun 17 21:16:59 CEST 2013


On Mon, 17 Jun 2013 20:57:33 +0200
Fred van Stappen <fiens at hotmail.com> wrote:

> 
> 
> > >
> > > Hello.
> > >
> > > Is there a plan to add a function like Application.onChangeComponentCount ?
> > >
> > > I want to catch a signal when a new form is created (or deleted).
> > > I know that the best way is to create a parent form and from this use
> > > the form.oncreate event.
> > > But if the form has no parent the only way to know if a new form was
> > > created (or deleted) is to check if Application.ComponentCount was
> > > changed. (with a timer)

In LCL you can use this:
Screen.AddHandlerFormAdded(@OnFormAdded);

All forms are added to Screen, including those owned by Application.


Mattias



More information about the fpc-pascal mailing list