function PointIntoRect(Point: TPoint; Rect: TRect): boolean;begin Result := (Point.x >= Rect.Left) and (Point.x <= Rect.Right) and (Point.y >= Rect.Top) and (Point.y <= Rect.Bottom);end;