See Also Example
Applies To
Form, picture box
Description
Determines the line width for output from graphics methods
Usage
{ [form.][picturebox.]|Printer.}DrawWidth[ = size ]
Setting
You can set DrawWidth to a value of 1 through 32,767. This value represents the width of the line in pixels. The default is 1, or 1 pixel wide.
Remarks
Increase the value of this property to increase the width of the line. If DrawWidth is greater than 1, DrawStyle property settings 1 through 4 produce a solid line (the DrawStyle property value isn't changed). Setting DrawWidth to 1 allows DrawStyle to produce the results shown in the DrawStyle property table.
Data Type
Integer
Help:
Circle Method
DrawMode Property
DrawStyle Property
FillColor Property
FillStyle Property
ForeColor Property
Programmer's Guide:
Chapter 15, "Creating Graphics for Applications"
The example draws a gradually thickening line across a form. To try this example, paste the code into the Declarations section of a form. Then press F5 and click the form.
Sub Form_Click ()
Dim I ' Declare variable.
DrawWidth = 1 ' Set starting pen width.
PSet (0, ScaleHeight / 2) ' Set starting point.
ForeColor = QBColor(5) ' Set pen color.
For I = 1 To 100 Step 10 ' Set up loop.
DrawWidth = I ' Reset pen width.
Line - Step(ScaleWidth / 10, 0) ' Draw a line.
Next I
End Sub