Hi,
Könntest mal so probieren (ist ein wenig lange...) oder mit einem lokalen Maus-Hook.
Delphi-Quellcode:
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
procedure AppOnMessage(var Msg: TMsg; var Handled: Boolean);
procedure WMNCRBUTTONDOWN(var msg: TMessage); message WM_NCRBUTTONDOWN;
procedure WMNCLBUTTONDOWN(var msg: TMessage); message WM_NCLBUTTONDOWN;
procedure WMNCLBUTTONDBLCLK(var msg: TMessage); message WM_NCLBUTTONDBLCLK;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.AppOnMessage(var Msg: TMsg; var Handled: Boolean);
begin
case Msg.Message of
WM_MOUSEFIRST..WM_MOUSELAST:
Handled := True
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnMessage := AppOnMessage;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
Application.OnMessage := nil;
end;
procedure TForm1.WMNCRBUTTONDOWN(var msg: TMessage);
begin
if msg.wParam = HTCAPTION then
msg.Result := 0
else
inherited;
end;
procedure TForm1.WMNCLBUTTONDOWN(var msg: TMessage);
begin
if msg.wParam = HTCAPTION then
msg.Result := 0
else
inherited;
end;
procedure TForm1.WMNCLBUTTONDBLCLK(var msg: TMessage);
begin
if msg.wParam = HTCAPTION then
msg.Result := 0
else
inherited;
end;