function My_CurLock(ileft, itop, iright, idown: integer): Boolean; //鼠标锁定<br>var<br> aRect: TRect;<br>begin<br> aRect := Rect(ileft, itop, iright, idown);<br> Result := ClipCursor(@aRect);<br>end;<br>先取得当前位置<br> VAR P:TPOINT;<br> BEGIN<br> GETCURSORPOS(P);<br> POP1.POPOP(P.X,P.Y);<br> END;<br> <br><br>function My_CurUNLock: Boolean; //鼠标解锁<br>begin<br> Result := ClipCursor(nil);<br>end;