Control Reference > VSPrinter Control > VSPrinter Methods > DrawRectangle Method (VSPrinter) |
Draws a rectangle.
[form!]VSPrinter.DrawRectangle X1 As Variant, Y1 As Variant, X2 As Variant, Y2 As Variant, [ Radius1 As Variant ], [ Radius2 As Variant ]
The parameters for the DrawRectangle method are described below:
Parameter |
Description |
X1, Y1 |
First corner of the rectangle. |
X2, Y2 |
Second corner of the rectangle. |
Radius1 |
Optional parameter that specifies the radius of a rounded rectangle's corner, in the horizontal direction. |
Radius2 |
Optional parameter that specifies the radius of a rounded rectangle's corner, in the vertical direction. |
All graphical objects are drawn with the current pen and filled with the current brush. Pen and brush attributes are defined with the PenColor, PenStyle, PenWidth, BrushColor, and BrushStyle properties.
If the Radius1 and Radius2 parameters are omitted, a rectangle is drawn.
All measurements may be specified with units (inches, points, twips, cm, mm, or pixels). The default unit is twips. For details on using unit-aware measurements, see the Using Unit-Aware Properties topic.