This document is archived and information here might be outdated.  Recommended version.


IPaper.TrayID Property (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Output)  

IPaper.TrayID Property

The printer tray. Use Win32 DMBIN_xxx constants.

[Visual Basic .NET]
Public Property TrayID As Short
[C#]
public short TrayID {get; set;}
[C++]
HRESULT get_TrayID(
  System.Int16* TrayID
);
[C++]
HRESULT put_TrayID(
  short TrayID
);
[C++]

Parameters TrayID [out, retval]
TrayID is a parameter of type short* TrayID [in]
TrayID is a parameter of type short

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

Use the TrayID property to control which paper tray will be used for feeding printer paper.  Because the value of the TrayID property will be used by the printer driver directly, it must contain a valid value at print time.  The Win32 API documentation makes reference to these values as the DMBIN contstants.  In practice, no printer driver supports the full range of DMBIN paper tray values; usually only a small subset is valid. Thus, it is not possible to assign an arbitrary DMBIN constant to the TrayID property. You must always first enumerate for valid tray ids before assigning.  Use the IPaper interface's Trays enumerator to get a list valid tray ids for the currently selected printer.

See Also

IPaper Interface