var OrgFormPoint, CurCursorPoint, OrgCursorPoint: TPoint;
y donde quieres que el usuario mantenga el boton para arrestrar la ventana
OrgFormPoint.X := Left;
OrgFormPoint.Y := Top;
GetCursorpos(OrgCursorPoint);
While (GetAsyncKeystate(VK_LBUTTON) <> 0) do
begin
GetCursorpos(CurCursorPoint);
Left := OrgFormPoint.X - OrgCursorPoint.X + CurCursorPoint.X;
Top := OrgFormPoint.Y - OrgCursorPoint.Y + CurCursorPoint.Y;
//Application.processmessages;
end;
|