You can use Application.AddMessageFilter to register a message filter. From the documentation:
Use a message filter to prevent specific events from being raised or to perform special operations for an event before it is passed to an event handler. Message filters are unique to a specific thread.
To prevent a message from being dispatched, the value parameter instance that you pass to this method must override the PreFilterMessage method with the code to handle the message. The method must return false.
This offers exactly the same functionality as Delphi's OnMessage event.