Delphi fmx移动无边框形式

时间:2014-02-21 14:03:16

标签: macos delphi

当你快速移动鼠标时,如何使用Delphi FMX进行表格移动。 ?。 我已经尝试过下面的代码但是当你将鼠标移动到快速时它停止工作。

How to drag a borderless FMX form on the screen through another object?

1 个答案:

答案 0 :(得分:0)

虽然在帖子中提及它作为OP的评论链接,我认为在这里添加它也没有什么坏处,因为它不是那里接受的答案,有些人在以后搜索这个可能会错过它。还要确保它实际上是鼠标左键,除非你想用其他按钮拖动它。

procedure TMyForm.DragPanelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Single);
begin
  if (Button = TMouseButton.mbLeft) then StartWindowDrag;
end;