Setting up a TMessage trap



I have a program that is using a timer to scan and determine if
another program has started. I would like to get away from using a
timer. Is there possibly a message trap I could set up to look for
certain messages, such as WM_CREATE, whereby I could upon encountering
do the above scan for the other program. An example would be
appreciated.

Thanks.
.