Delphi如何实现无边框窗体的移动

在控件的MouseDown事件中加入
if (ssleft in Shift) then
begin ReleaseCapture; Perform(WM_syscommand, $F012, 0);
end;
如form1:
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if (ssleft in Shift) then
begin ReleaseCapture; Perform(WM_syscommand, $F012, 0);
end;
end;
end.

转载于:https://www.cnblogs.com/blogpro/p/11446741.html

你可能感兴趣的:(Delphi如何实现无边框窗体的移动)