I have a "borderless" Form with property WindowState = wsMaximized
.
I can drag the form with this code in the OnMouseDown
event of a Panel on the Form:
procedure TForm10.Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if button = mbLeft then begin
ReleaseCapture();
Self.Perform( WM_SYSCOMMAND, SC_DRAGMOVE, 0 );
end;
end;
But, after dragging, the Form loses its ability to dock all over the window.
How can I force the Form to dock again, as if it was a bordered Form?