DrawStyle Property

See Also6TPQHP                 ExampleU9BDZ6>Low

Applies To

Form14TJ2LN, picture box31MYIWX, Printer objectCBQUDQ.

Description

Determines the line style for output from graphics methodsAY3LGR.

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 DrawWidthMEUSKJ is set to a value greater than 1, then DrawStyles 1 through 4 produce a solid line (the DrawStyle property value is not changed).  If DrawWidth is set to 1, DrawStyle produces the effect described above for each setting.

Data Type

IntegerDOKXHY (Enumerated)


See Also

Help:

Circle Method38E9WK

DrawMode Property2ZATBSD

FillColor PropertyL2TW7M

FillStyle Property2N3S7OE

ForeColor Property1W9T6JQ

Line MethodGU01B0

PSet Method103J0PY

 

Programmer's Guide:

Chapter 15, "Creating Graphics for Applications"


DrawStyle Property Example

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