Share via


Printer.DrawStyle Property

Gets or sets a value that determines the line style for output from graphics methods.

Namespace:  Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

'Declaration
Public Property DrawStyle As Short
public short DrawStyle { get; set; }
public:
property short DrawStyle {
    short get ();
    void set (short value);
}
member DrawStyle : int16 with get, set
function get DrawStyle () : short 
function set DrawStyle (value : short)

Property Value

Type: Int16
Returns a Short.

Remarks

If the DrawWidth property is set to a value greater than 1, DrawStyle settings 1 through 4 produce a solid line (and the DrawStyle property value is not changed). If DrawWidth is set to 1, DrawStyle produces the effect described for each setting in the following table.

The following table lists the DrawStyleConstants values that are valid for the DrawStyle property.

Constant

Value

Description

vbSolid

0

Solid (default)

vbDash

1

Dash

vbDot

2

Dot

vbDashDot

3

Dash - dot

vbDashDotDot

4

Dash - dot - dot

Note

Functions and objects in the Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

Examples

The following example demonstrates how to set the DrawStyle property.

Dim Printer As New Printer
Printer.CurrentX = 500
Printer.CurrentY = 500
Printer.DrawStyle = vbDash
Printer.Line(1000, 500)
Printer.EndDoc()

.NET Framework Security

See Also

Reference

Printer Class

Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 Namespace

Other Resources

Printer Compatibility Library

How to: Fix Upgrade Errors by Using the Printer Compatibility Library (Visual Basic)

Deploying Applications That Reference the Printer Compatibility Library