比如鼠标左键点击form中的一个button就可以移动整个窗体,只需在其mousemove事件中加入以下代码。

procedure TForm1.btn1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin

  ReleaseCapture;
  SendMessage(Self.Handle,WM_SYSCOMMAND,SC_MOVE+1,0);
end;

 

相关文章:

  • 2022-12-23
  • 2022-02-01
  • 2021-08-10
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
相关资源
相似解决方案