Creates lines and rectangles on a document to be printed.
- X1
- Single-precision floating-point value indicating the x coordinate of the starting point for the line or rectangle.
- Y1
- Single-precision floating-point value indicating the y coordinate of the starting point for the line or rectangle.
- X2
- Single-precision values indicating the x coordinate of the end point for the line being drawn, or opposite corner of a rectangle being drawn.
- Y2
- Single-precision values indicating the y coordinate of the end point for the line being drawn, or opposite corner of a rectangle being drawn.
- penColor
- Box
- A Boolean value that if True, causes a box to be drawn using the coordinates to specify opposite corners of the box. If False, a line is drawn.
- Fill
The coordinates of the line must be within the physical area of the printed page.
To draw connected lines, begin a subsequent line at the end point of the previous line.
The width of the line drawn depends on the setting of the DrawWidth property.
The way a line or box is drawn on the background depends on the setting of the DrawMode and DrawStyle properties.
If a printer has not been selected or a document has not been started, the DrawLine method selects the default printer and starts a new document. You can omit an argument in the middle of the syntax, but you must include the argument’s comma before including the next argument.
When DrawLine executes, the CurrentX and CurrentY properties are set to x2 and y2.