抢分的来了!
$F017 可以用于任何有Handle 的控件。
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
const
SC_DragMove = $F017; {WM_SysCommand 's param means Move.}
begin
if Button <> mbRight then
begin
ReleaseCapture;
Form1.Perform(WM_SysCommand, SC_Dragmove, 0);
end;
end;