PtInRect Method

Returns a Boolean value: TRUE, if the point with the specified coordinates is within the rectanlge, otherwise - FALSE.

Applies to objects: DRect

Syntax

[[Let] res = ] object.PtInRect ( x, y )

The PtInRect method syntax has these parts:

Part Description
object A reference to an instance of the object.
x, y X,Y coordinates of the point, Double values.
res A Boolean type variable.

Example

This example demonstrates using the PtInRect method.

Dim MyObject as new DRect, res as Boolean

'set DRect object properties
MyObject.SetRect(100,100,200,500)
res = MyObject.PtInRect(150,250) ' res = true

 

See Also

DRect Object