Partager via


Printer.PaperBin Property

Gets or sets a value indicating the default paper bin on the printer from which paper is fed during print operations.

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

Syntax

'Déclaration
Public Property PaperBin As Short
    Get
    Set
public short PaperBin { get; set; }
public:
property short PaperBin {
    short get ();
    void set (short value);
}
member PaperBin : int16 with get, set
function get PaperBin () : short
function set PaperBin (value : short)

Property Value

Type: System.Int16
Returns a Short.

Remarks

Some bin options are unavailable on some printers. Check the printer documentation for more specific descriptions of these options.

If you set this property after you call the Print, Circle, Line, or PSet methods on a new page, a run-time exception occurs.

The following table lists the PrinterObjectConstants values that are valid for the PaperBin property.

Constant

Value

Description

vbPRBNUpper

1

Use paper from the upper bin.

vbPRBNLower

2

Use paper from the lower bin.

vbPRBNMiddle

3

Use paper from the middle bin.

vbPRBNManual

4

Wait for manual insertion of each sheet of paper.

vbPRBNEnvelope

5

Use envelopes from the envelope feeder.

vbPRBNEnvManual

6

Use envelopes from the envelope feeder, but wait for manual insertion.

vbPRBNAuto

7

Use paper from the current default bin. (This is the default.)

vbPRBNTractor

8

Use paper fed from the tractor feeder.

vbPRBNSmallFmt

9

Use paper from the small paper feeder.

vbPRBNLargeFmt

10

Use paper from the large paper bin.

vbPRBNLargeCapacity

11

Use paper from the large capacity feeder.

vbPRBNCassette

14

Use paper from the attached cassette cartridge.

Notes

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 2010. 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 retrieve the PaperBin property value.

Dim Printer As New Printer
Printer.PrintAction = Printing.PrintAction.PrintToPreview
Select Case Printer.PaperBin
    Case vbPRBNUpper
        Printer.Print("Using the upper bin")
    Case vbPRBNLower
        Printer.Print("Using the lower bin")
    Case vbPRBNMiddle
        Printer.Print("Using the middle bin")
    Case vbPRBNManual
        Printer.Print("Insert a sheet of paper")
    Case vbPRBNEnvelope
        Printer.Print("Using the envelope feeder")
    Case vbPRBNEnvManual
        Printer.Print("Insert an envelope")
    Case vbPRBNTractor
        Printer.Print("Using the tractor feeder")
    Case vbPRBNSmallFmt
        Printer.Print("Using the small paper feeder")
    Case vbPRBNLargeFmt
        Printer.Print("Using the large paper bin")
    Case vbPRBNLargeCapacity
        Printer.Print("Using the large capacity feeder")
    Case vbPRBNCassette
        Printer.Print("Using the attached cassette cartridge")
    Case Else
        Printer.Print("Using the default paper bin")
End Select
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