Box Method

Applies To   See Also

Draws a rectangle on a Form object.

Syntax

Object.Box(nXCoord1, nYCoord1, nXCoord2, nYCoord2)

-or-

Object.Box(nXCoord2, nYCoord2)

Arguments

nXCoord1, nYCoord1

Specifies the coordinates of the starting point for the rectangle. The ScaleMode method of the form determines the unit of measurement used. If you omit these arguments, the value of CurrentX and CurrentY are used.

nXCoord2, nYCoord2

Specifies the endpoint of the rectangle.

Remarks

The width of the lines drawn depends on the DrawWidth property setting. How a rectangle is drawn on the background depends on the settings of the DrawMode and DrawStyle properties. When the Box method is called, the CurrentX and CurrentY properties are set to the endpoint specified by the last two arguments.