Sending Your Own Messages
Just as Windows sends messages to your application's windows, you will occasionally need to send messages between windows and controls within your application. Delphi provides several ways to send messages within your application, such as the Perform() method (which works independently of the Windows API) and the SendMessage() and PostMessage() API functions.
The Perform() Method
VCL provides the Perform() method for all TControl descendants; Perform() enables you to send a message to any form or control object given an instance of that object. The Perform() method takes three parameters—a message and its corresponding lParam and wParam—and is defined as follows:
function TControl.Perform(Msg: Cardinal; WParam, LParam: ...
Get Borland® Delphi™ 6 Developer's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.