Versuche es mal hiermit:
Delphi-Quellcode:
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure MeineAppOnMessage(var Msg: TMsg; var Handled: boolean);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.MeineAppOnMessage(var Msg: TMsg; var Handled: boolean);
begin
case Msg.Message of
WM_MouseMove:
begin
//mach was!
beep;
end;
WM_LBUTTONUP:
begin
//
end;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
application.OnMessage:= MeineAppOnMessage;
end;
end.
Das onCreate Ereignis der Form nicht vergessen!