In Firemonkey coordinates, the mouse does not relate the top / left pixel of the form at any time.
You can use the functions to convert them and simulate a sizegrip file with this code:
procedure TFenetre.btnRedimensionneMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Single);
begin
if (ssLeft in Shift) then
begin
deplacementX := X;
deplacementY := Y;
end;
end;
procedure TFenetre.btnRedimensionneMouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Single);
begin
if (ssLeft in Shift) then
begin
Self.width := Self.width - deplacementX + X;
Self.height := Self.height - deplacementY + Y;
end;
end;
btnRedimensionne is a button, image, or something else used to control capture.
Add this to your class:
deplacementX, deplacementY: Single;
( /).