1

I am in a situation where I would like to have a form in my application catch all the custom messages i post from other forms. The messages may be send with a handle that is not the handle of the 'sniffer' Is that possible at all?

OZ8HP
  • 1,443
  • 4
  • 31
  • 61
  • Possible duplicate of [How do I catch certain events of a form from outside the form?](http://stackoverflow.com/questions/8743876/how-do-i-catch-certain-events-of-a-form-from-outside-the-form) – whosrdaddy Apr 18 '16 at 09:30
  • 4
    You want to sniff all messages that are posted with `PostMessage`? You don't want to sniff synchronous messages send with `SendMessage`? If so handle `TApplication.OnMessage`. – David Heffernan Apr 18 '16 at 10:13
  • Working like I want - thanks – OZ8HP Apr 20 '16 at 15:08

1 Answers1

1

Drop a TApplicationEvents component on the form and handle the OnMessage Event

Donovan Boddy
  • 489
  • 1
  • 6
  • 14