Delphi中运行时改变panel的位置及大小(通过wm_SysCommand来实现)

时间:2024-01-01 14:56:09

procedure TForm1.pnl1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  ReleaseCapture;
SendMessage(pnl1.Handle,wm_SysCommand,$F012,0);//改变位置
//ReleaseCapture;
//SendMessage(pnl1.Handle,wm_SysCommand,$F008,0);//改变大小
end;

http://blog.csdn.net/diligentcatrich/article/details/7789861