源代码:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
protected
procedure Dispatch(var Message);override;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TForm1 }
{ TForm1 }
procedure TForm1.Dispatch(var Message);
begin
inherited;
if Tmessage(Message).Msg=WM_LBUTTONDOWN then
begin
ShowMessage('Dispatch');
end;
end;
end.