Box Method

Draws a rectangle on a Form object.

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

-Or-

Object.Box(nXCoord2, nYCoord2)

Parameters

  • 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.

See Also

CurrentX, CurrentY Properties | DrawMode Property | DrawStyle Property | DrawWidth Property | ScaleMode Property

Applies To: Form Object | _SCREEN