See Also Example
Applies To
Form, picture box
Description
Determines the line style for output from graphics methods
Usage
{ [form.][picturebox.]|Printer.}DrawStyle[ = style ]
Setting
The DrawStyle property settings are:
Setting Description
0 (Default) Solid
1 Dash
2 Dot
3 Dash-Dot
4 Dash-Dot-Dot
5 Transparent
6 Inside Solid
Remarks
If DrawWidth If DrawWidth is set to 1, DrawStyle produces the effect described above for each setting.
Data Type
Integer (Enumerated)
Help:
Circle Method
DrawMode Property
FillColor Property
FillStyle Property
ForeColor Property
Line Method
PSet Method
Programmer's Guide:
Chapter 15, "Creating Graphics for Applications"
The example draws seven lines across a form, with each line displaying a different DrawStyle. (If you set AutoRedraw = True, the form accumulates a new set of lines each time you resize it and then click it.) 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.
ScaleHeight = 8 ' Divide height by 8.
For I = 0 To 6
DrawStyle = I ' Change style.
Line (0, I + 1) - (ScaleWidth, I + 1) ' Draw new line.
Next I
End Sub