DrawLine

This method draws lines and rectangles on a Form.

Syntax

form.DrawLine x1, y1, x2, y2, [color], [boxfill]

Parameters

form
Object expression that evaluates to a Form. If omitted, the Form with the focus is assumed to be form.
x1
Required. Horizontal coordinate of the starting point for a line or rectangle.
y1
Required. Vertical coordinate of the starting point for a line or rectangle.
x2
Required. Horizontal coordinate of the end point for a line or rectangle.
y2
Required. The vertical coordinate of the end point for a line or rectangle.
color
Optional. Value that indicates the RGB color used to draw a line. If omitted, the ForeColor property setting is used.
boxfill
Optional. The function vbLineBox causes a box to be drawn using the coordinates to specify opposite corners of the box. The function vbLineBoxFill specifies that the box is filled with the same color used to draw the box.

Return Value

None.

Remarks

The DrawWidth property determines the width of the line. The DrawMode and DrawStyle properties determine the appearance of a line or box on the background.

The ScaleMode property determines the unit of measure used.