[fpc-pascal] Application.onChangeComponentCount ?
Fred van Stappen
fiens at hotmail.com
Tue Jun 18 12:22:47 CEST 2013
> Date: Mon, 17 Jun 2013 21:16:59 +0200
> From: nc-gaertnma at netcologne.de
> To: fpc-pascal at lists.freepascal.org
> Subject: Re: [fpc-pascal] Application.onChangeComponentCount ?
>
> 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
Magnifique, many thanks Mattias. ;-)
Humm, no idea how to do for console application ( like application using fpGUI ?).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130618/68d35ddc/attachment.html>
More information about the fpc-pascal
mailing list