Line method


Available for Window, DialogBox and Picture objects.

Prototype

Line Proto hWnd:HWND, x1:LONG, y1:LONG, x2:LONG, y2:LONG, bRect:BOOL, crFill:COLORREF

Syntax

Invoke Line, hWnd, x1, y1, x2, y2, bRect, crFill

Function

Draws a line (or rectangle) in the specified coordinates.

Parameters

hWnd

Handle to the object.

x1

X-coordinate of the line's starting point.

y1

Y-coordinate of line's starting point.

x2

X-coordinate of line's ending point.

y2

Y-coordinate of line's ending point.

bRect

Specifies if a rectangle has to be drawn.

crFill

Specifies the color to fill the rectangle with.

Return value

Eax/Rax returns TRUE if successful, or FALSE if not.


REMARKS: The
DrawingStyle and DrawingWifth properties are used to draw the line or rectangle. If the bRect parameter is FALSE, the method draws just a line and the crFill parameter is ignored. On the other hand, if the bRect parameter is TRUE, the method draws a rectangle which is filled with the color specified by crFill. If the crFill parameter is -1, the rectangle is filled with the back color of the object (see the BackColor property).