在运行时移动控件
![](https://images0.cnblogs.com/blog/300447/201407/291826164153474.gif)
procedure TForm1.Button1MouseDown(Sender:
TObject; Button: TMouseButton;
Shift: TShiftState; X, Y:
Integer);
const
SC_DragMove
= $F012;
begin
Begin
ReleaseCapture;
Button1.perform(WM_SysCommand,
SC_DragMove, 0);
End;
end;