This method draws a line in the designated object (the screen, printer, or image data).
Parameters
Name | Explanation |
---|---|
DeviceValue | The device context or the raster image data (i.e. Hdc or ImageHandle) |
left,top | x and y coordinates of the starting point of the line |
right,bottom | x and y coordinates of the ending point of the line |
DeviceMode | If 0 (ikScreen), then the line will be drawn in pixel units. If 1 (ikPrinter), the line will be drawn in 0.1mm units. If 2 (ikMemoryHandle), the line will be drawn (in pixel units) to the image data according to the DeviceValue parameter |
In Visual Basic the following constants can be used: (ikScreen = 0, ikPrinter = 1, ikMemoryHandle = 2).
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful.
Explanation
The Line method draws a line in the designated object (the screen, printer, or image data). The line is drawn from the top, left coordinates (starting point) to the bottom right coordinates (ending point). Note: The ending point is not included in the line. This method can draw in the following designated objects: screen, printer, and image data. The line is drawn from the value set in the PenStyle property. This property must be set. When drawing a line, it is recommended that the PenWidth , PenMode, PenColor, Transparent, and BackColor properties also be set. The BackColor property is enabled when the Transparent property is False and the pen is solid.
If the DeviceMode parameter is 0 or 2 then the left, top, right, bottom parameters will be in pixel units.
If the DeviceMode parameter is 1 then the left, top, right, bottom parameters will be in 0.1mm units.