کد به صورت زیره:

Code:

;(procedure TForm1.FormActivate(Sender: TObject
var
; Po :TPoint
a:TRect ;
Begin
a := ClientRect;
with a do begin
po := ClientToScreen(Point(Left,Top)) ;
Left := Po.X;
Top := Po.Y ;
Po := ClientToScreen(Point(Right,Bottom)) ;
Right := Po.X;
Bottom := Po.Y;
end;
ClipCursor(@a);
end;