Hi
Bei einem TPanel müsste auch folgendes funktionieren:
Delphi-Quellcode:
type
TPanel= class(ExtCtrls.TPanel)
procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;
protected
procedure CreateParams(var Params: TCreateParams); override;
end;
...
procedure TPanel.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.Style := Params.Style or WS_SIZEBOX;
end;
procedure TPanel.WMNCHitTest(var Message: TWMNCHitTest);
begin
inherited;
if Message.Result = htClient then
Message.Result := htCaption;
end;