Printer.PSet Method (Boolean, Single, Single, Int32)

Prints a single point in a specified color on a page, optionally specifying a point relative to the current coordinates.

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

Syntax

'Declaration
Public Sub PSet ( _
    relativeStart As Boolean, _
    x As Single, _
    y As Single, _
    color As Integer _
)
public void PSet(
    bool relativeStart,
    float x,
    float y,
    int color
)
public:
void PSet(
    bool relativeStart, 
    float x, 
    float y, 
    int color
)
member PSet : 
        relativeStart:bool * 
        x:float32 * 
        y:float32 * 
        color:int -> unit
public function PSet(
    relativeStart : boolean, 
    x : float, 
    y : float, 
    color : int
)

Parameters

  • relativeStart
    Type: Boolean

    Boolean value indicating whether the coordinates are relative to the current graphics position (as set by CurrentX, CurrentY).

  • x
    Type: Single

    Single value indicating the horizontal coordinates of the point to print.

  • y
    Type: Single

    Single value indicating the vertical coordinates of the point to print.

  • color
    Type: Int32

    Optional. Integer value indicating the RGB (red-green-blue) color specified for the point. If this parameter is omitted, the current ForeColor property setting is used.

Remarks

The size of the point printed depends on the setting of the DrawWidth property. When DrawWidth is set to 1, PSet prints a single point in the specified color. When DrawWidth is more than 1, the point is centered on the specified coordinates.

The manner in which the point is printed depends on the setting of the DrawStyle property.

When PSet runs, the CurrentX and CurrentY properties are set to the point specified by the arguments.

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 print a single point, relative to the graphics position set by CurrentX and CurrentY, in a specified color.

Dim Printer As New Printer
Printer.CurrentX = 1000
Printer.CurrentY = 1000
Printer.PSet(True, 500, 500, vbRed)
Printer.EndDoc()

.NET Framework Security

See Also

Reference

Printer Class

PSet Overload

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