Line Control

This control displays simple line segments on a form, frame, or picture box. You can control the position, length, color, and style of a line control to customize the appearance of an application.

Syntax

Line

The Line control supports the following properties:

BorderColor Name
BorderStyle Parent
BorderWidth Tag
Container Visible
DrawMode X1,Y1,X2,Y2

The Line control supports the following methods:

Remarks

The Line control has limited functionality and is intended for simple uses, such as display and printing. Line segments cannot be joined to form other shapes. For more advanced uses, use the DrawLine method. You can set the color and style of a line segment by using the BorderStyle and BorderColor properties.

To set colors at run time, use a color constant or the RGB function to specify border colors. When BorderStyle is set to 0, the BorderColor property is ignored.

You can move or resize the line control at run time by altering its X1, X2, Y1, and Y2 properties. The X1 and Y1 properties set the horizontal and vertical positions of the left end of the line segment. The X2 and Y2 properties set the horizontal and vertical positions of the right end of the line segment. You cannot move a line segment using the Move method.