> Date: Mon, 17 Jun 2013 21:16:59 +0200 > From: nc-gaert...@netcologne.de > To: fpc-pascal@lists.freepascal.org > Subject: Re: [fpc-pascal] Application.onChangeComponentCount ? > > On Mon, 17 Jun 2013 20:57:33 +0200 > Fred van Stappen <fi...@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 ?).
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal