共用方式為


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)

屬性值

類型: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

使用從附加的旋轉錄音帶卡匣的紙張。

注意事項注意事項

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 命名空間

其他資源

Printer Compatibility Library

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

Deploying Applications That Reference the Printer Compatibility Library