unit MyMouseEvents;
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs;
type
TForm1 =
class(TForm)
private
public
procedure DoMouseDown(Sender: TObject; Buttons: TMouseButton; Shift: TShiftState; X,Y:Integer);
procedure DoMouseMove(Sender: TObject; Buttons: TMouseButton; Shift: TShiftState; X,Y:Integer);
procedure DoMouseUp(Sender: TObject; Buttons: TMouseButton; Shift: TShiftState; X,Y:Integer);
constructor Create(AOwner: TComponent);
override;
end;
implementation
constructor TForm1.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
OnMouseDown := DoMouseDown;
OnMouseMove := DoMouseMove;
OnMouseUp := DoMouseUp;
end;
procedure TForm1.DoMouseDown(Sender: TObject; Buttons: TMouseButton; Shift: TShiftState; X, Y: Longint
);
begin
ShowMessage('
Maus gedrückt!');
end;
procedure TForm1.DoMouseMove(Sender: TObject; Buttons: TMouseButton; Shift: TShiftState; X, Y: Longint
);
begin
ShowMessage('
Maus bewegt!');
end;
procedure TForm1.DoMouseUp(Sender: TObject; Buttons: TMouseButton; Shift: TShiftState; X, Y: Longint);
begin
ShowMessage('
Maus losgelassen!');
end;
initialization
{$I main.lrs}
end.