[Solved] How to change the ClientRect of a form?


type
  TForm1 = class(TForm)
    ..
  private
    procedure WmNCCalcSize(var Msg: TWMNCCalcSize); message WM_NCCALCSIZE;
    ..

..

procedure TForm1.WmNCCalcSize(var Msg: TWMNCCalcSize);
begin
  inherited;
  if Msg.CalcValidRects then begin
    InflateRect(Msg.CalcSize_Params.rgrc[0], -10, -6);
    Msg.Result := 0;
  end;
end;

Please, carefully read WM_NCCALCSIZE‘s documentation though, including the remarks section and also NCCALCSIZE_PARAMS, as I’m not sure this is what you want. But this is your message..

1

solved How to change the ClientRect of a form?