Printer.PaperBin 属性

获取或设置一个在页面提供打印机的值默认页面框在打印操作过程中,。

命名空间:  Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
程序集:  Microsoft.VisualBasic.PowerPacks.Vs(在 Microsoft.VisualBasic.PowerPacks.Vs.dll 中)

语法

声明
Public Property PaperBin As Short
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)

属性值

类型:System.Int16
返回一个 Short。

备注

这些框选项不可用在有些打印机。检查打印机文档这些选项的更具体的说明。

如果设置此属性,在调用 PrintCircleLinePSet 方法在新页后,会运行时异常。

下表列出了 PaperBin 属性就是有效的 PrinterObjectConstants 值。

常量

说明

vbPRBNUpper

1

使用从上面的框的文件。

vbPRBNLower

2

使用从较低的框的文件。

vbPRBNMiddle

3

使用从该元框的文件。

vbPRBNManual

4

等待每个平板纸的手动插入。

vbPRBNEnvelope

5

使用从信封馈电线的信封。

vbPRBNEnvManual

6

使用从信封馈电线的信封,但是,等待手动插入。

vbPRBNAuto

7

使用当前默认框的文件。(这是默认设置。)

vbPRBNTractor

8

使用从拖拉机馈电线提供的页面。

vbPRBNSmallFmt

9

使用从小的滚动馈送设备的文件。

vbPRBNLargeFmt

10

使用源自大型个具有框的文件。

vbPRBNLargeCapacity

11

使用从大容量馈电线的文件。

vbPRBNCassette

14

使用附加的盒式磁带 pack 的文件。

说明说明

Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 命名空间中的函数和对象是提供给用于将 Visual Basic 6.0 升级到 Visual Basic 的工具使用的。大多数情况下,这些函数和对象可再现 .NET Framework 中其他命名空间的功能。只有 Visual Basic 6.0 代码模型与 .NET Framework 实现有显著区别时才需要这些函数和对象。

示例

下面的示例演示如何检索 PaperBin 属性值。

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 安全性

请参见

参考

Printer 类

Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 命名空间

其他资源

打印机兼容性库

如何:使用打印机兼容性库修复升级错误 (Visual Basic)

部署引用打印机兼容性库的应用程序