Draws a line on a Form object. There are two versions of the syntax.
Object.Line(nXCoord1, nYCoord1, nXCoord2, nYCoord2)
- 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.
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.