Neven,

I had the same problem... in the end I settled for a singleton object.  
The form that may want to be informed registers itself (and 
deregisters on destroy).  I keep a list of interested parties and what 
their interest is and then send them appropriate messages.

In this case it was a barcode despatcher.... the forms tell it if they 
can handle client barcode, or product barcode etc.

I would have preferred an automatic method but it didnt work.  :-)

To:                     Multiple recipients of list delphi 
<[EMAIL PROTECTED]>
Send reply to:          [EMAIL PROTECTED]
From:                   "Neven MacEwan" <[EMAIL PROTECTED]>
Subject:                [DUG]:  PostMessage
Date sent:              Tue, 18 Mar 2003 22:28:28 +1200

> Hi all
> 
> In my app I have a whole lot of forms which are embedded in a page control
> of the 'Main Form'
> If one one these forms wants to notify all other forms in the app of a
> change, what is the best way to do it?
> 
> Iv'e tried
> 
>   PostMessage(HWND_BROADCAST, WM_APPDATACHANGE, 0, 0);
> 
> but none of the other forms seem to get this message, is this because I
> really only have 1 form in my app?
> 
> TIA
> 
> 
>  Regards Neven
>  N.K. MacEwan B.E. E&E
>  Ph 649 621 0001
>  Fax 649 621 0400
>  [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED] 
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> 

Regards

Rohit

====================================================
==================
CFL - Computer Fanatics Ltd.  21 Barry's Point Road, AKL, New 
Zealand
PH    (649) 489-2280 
FX    (649) 489-2290
email [EMAIL PROTECTED]  or  [EMAIL PROTECTED]
====================================================
==================

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to