MapWindowPoints限制鼠标的位置

功能说明:MapWindowPoints限制鼠标的位置 
var
  pos: TRect;
{公共声明}


procedureTForm1.Button1Click(Sender: TObject);
begin
   pos :=panel1.BoundsRect;
   MapWindowPoints(handle, 0, pos, 2); // 座标换算
   ClipCursor(@pos);
end;


procedureTForm1.Panel1DblClick(Sender: TObject);
begin
   close;
end;




你可能感兴趣的:(window)