> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Mark Howard
> Sent: Friday, 4 February 2000 14:40
> To: Multiple recipients of list delphi
> Subject: [DUG]: Setting Default Printer Tray
>
>
> Hi
>
> A site has an HP 2100 and my app is by default trying to print to
> the wrong tray. (QR2)
>
> By using the QRPreview Printer setup dialog box, we can get it to
> print to the correct tray (Tray2).
>
> Is someone able to send me a snippet of code which demonstrates
> how to do this programmatically?
The OutputBin property of the Printer Settings of the Report is set to one
of the constants. I believe these correspond to the constants listed in
Windows.pas for DMBIN_ i.e.
DMBIN_UPPER = 1;
DMBIN_FIRST = DMBIN_UPPER;
DMBIN_ONLYONE = 1;
DMBIN_LOWER = 2;
DMBIN_MIDDLE = 3;
DMBIN_MANUAL = 4;
DMBIN_ENVELOPE = 5;
DMBIN_ENVMANUAL = 6;
DMBIN_AUTO = 7;
DMBIN_TRACTOR = 8;
DMBIN_SMALLFMT = 9;
DMBIN_LARGEFMT = 10;
DMBIN_LARGECAPACITY = 11;
DMBIN_CASSETTE = 14;
DMBIN_FORMSOURCE = 15;
>
> My aim is to use a printer setup dialog box at application level
> and to somehow capture and save the selected tray to the .INI
> file. Where can I find some documentation on how to capture the
> selected tray? Is this the simplest way to do it? Are there any
> hidden fish-hooks?
If you are using your own preview instead of the standard preview form then
your printer setup should be done using the PrinterSetup method of the
quickreport component. I wonder if the OutputBin property has an ordinal
value you can save to your INI file?
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz