AFAIK, Delphi compat.Here's the delphi code from Types unit. function PtInRect(const Rect: TRect; const P: TPoint): Boolean; begin Result := (P.X >= Rect.Left) and (P.X < Rect.Right) and (P.Y >= Rect.Top) and (P.Y < Rect.Bottom); end;