OffsetRect Method

Offsets the rectangle by the X and Y axes, calcualtes new coordinates for the instance of the object.

Applies to objects: DRect

Syntax

object.OffsetRect ( x, y )

The OffsetRect method syntax has these parts:

Part Description
object A reference to an instance of the object.
x

A Double value, represents the horizontal offset of the rectangle.

y A Double value, represents the vertical offset of the rectangle.

Example

' Create a new instance of the object
Dim MyObject as new DRect

' set left,top,right,bottom properties
MyObject.SetRect(100,100,200,300)
' offset rect ' After the operation the properties of MyObject will be equal to: ' left - 110, top - 85, right - 210, bottom - 285 MyObject.OffsetRect(10,-15)

 

See Also

DRect Object