Line Method

Applies To   See Also

Draws a line on a Form object.

Syntax

Object.Line(nXCoord2, nYCoord2)

-or-

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

Arguments

nXCoord1, nYCoord1

Specifies the coordinates of the starting point of the line. The unit of measurement is specified by the ScaleMode property of the form.

nXCoord2, nYCoord2

Specifies the coordinates of the endpoint of the line.

Remarks

The width of the line drawn depends on the setting of DrawWidth property. The way a line is drawn on the background depends on the setting of the DrawMode and DrawStyle properties. After the Line method runs, the CurrentX and CurrentY properties are set to nXCoord2, nYCoord2.