DrawBox

Draw a box for the given width and height at the specifiy location.

DrawBox(x As Single, y As Single, BoxWidth As Single, BoxHeight As Single, BorderColor As Color,
        BorderThickness As Single, Optional BoxCapStyle As pdf.LineCapStyle)

Values passed to this procedure:

x, yx, y coordinates on the page you want to draw the box. This is the top left position of the box.
BoxWidthBox width.
BoxHeightBox height.
BorderColorColor of box border.
BorderThicknessThickness of the border.
BoxCapStyleOptional. The box cap style specifies the shape to be used at the ends of each line that makes up the box. The three types are:

Squared - the stroke is squared off at the endpoint of the path. There is no projection beyond the end of the path.

Round - a semicircular arc with a diameter equal to the line width is drawn around the endpoint and filled in.

ProjectingSquare - The stroke continues beyond the endpoint of the path for a distance equal to half the line width and is squared off.

The default is Squared.

Example

DrawBox(0.5, 10.5, PageWidthInInch - 1, PageHeightInInch - 1, Color.Purple, 0.5, pdf.LineCapStyle.Round)

DrawBox(1.5, 9.5, PageWidthInInch - 3, PageHeightInInch - 3, Color.Gold, 0.2,
        pdf.LineCapStyle.ProjectingSquare)

DrawBox(2.5, 8.5, PageWidthInInch - 5, PageHeightInInch - 5, Color.Blue, 0.2,
        pdf.LineCapStyle.Squared)

Sample boxes