|
PrinterTrays is program that finds the paper trays
configured on your printers.
You can use the PrinterTrays program for testing your printers and paper trays configurations. You can also
use it in your own application. With PrinterTrays comes the fully working - royalty free - dll library called SystemPrinters
ready for you to use in your VB5/6 applications. If that is not enough, there is even a version available that
includes the full source code of the PrinterTrays program and the SystemPrinters dll.
|
Available as:
$29: Windows executable
$49: Executable + source code
|
The program finds all local and network printers configured on
your PC.
Selecting a printer the program queries the printer driver to find the paper trays or paper bins available on
that printer. It tells you the tray id for use in your own applications and the tray descriptive name.
Having selected a paper tray the program lets you print a small test page from the printer using your own test
message or a standard text indicating the tray and printer details.
See below a screenshot of PrinterTrays. In this example the HP OfficeJet is selected on the MAARTJE machine.
It has 3 paper trays or bins. The 3rd one is selected: tray id 6, the manual envelope tray. Using the Print button
I can now print a test message to that paper tray.

The PrinterTrays program uses the
SystemPrinters dll. You may use this dll in your own applications
royalty free. If you want, the source code for the dll is also
available in our full source code option.
You can use the SystemPrinters dll to
directly print to all of your paper trays or bins on your printers.
As an example of how easy it is to use consider the following code
snippet:
| 'Example1: print some text on
paper from a specific tray
'Note: to find the printer and
tray you can loop the collections 'also exposed by the
SystemsPrinter dll
Private SysPrinters As New
SystemPrinters.clsSystemPrinters Private prnt As
SystemPrinters.clsPrinter Private tray As
SystemPrinters.clsPaperTray
Set prnt =
SysPrinters.Printers.Item(1) Set tray =
prnt.PaperTrays(2)
Set Printer =
VB.Printers(prnt.ID) With Printer .PaperBin =
tray.PaperTrayId .CurrentX = 100 .CurrentY =
100 .Print "Printed on tray " &
tray.PaperTrayName
.NewPage .EndDoc End
With |
|
'Example2: print a Word
document on a specific tray
Private SysPrinters As New
SystemPrinters.clsSystemPrinters Private prnt As
SystemPrinters.clsPrinter Private tray As
SystemPrinters.clsPaperTray Private wrd as
Word.Application Private doc as Word.Document
Set wrd = GetObject(,"Word.Application") Set doc =
wrd.Documents("My document.doc")
Set prnt =
SysPrinters.Printers(3) Set tray = prnt.PaperTrays(2)
SysPrinters.PrintFile doc, prnt, tray, tray 'Note: 'PrintFile takes the paper tray and the first
paper tray 'as different
parameters |
Please note that
the full API description is included with the program. It also ships
with the trial version available for download.
|