procedure TForm1.PanelTopMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
const
SC_DRAGMOVE = $F012;
begin
if (Button = mbLeft) then
begin
ReleaseCapture;
(Self as TControl).Perform(WM_SYSCOMMAND, SC_DRAGMOVE, 0);
end;
end;