Link to home
Start Free TrialLog in
Avatar of dmcqueen
dmcqueen

asked on

Selecting a printer with code.

As a beginner in Delphi.  How do I select a non default printer with code ?  I know you can use getprinter and printerindex etc, but am unsure how to use these functions.
Help !  

Avatar of BlackMan
BlackMan

If you are talking standard Delphi, you should take a look at TPrinter (type it in a unit and press F1). It has a Printers and a PrinterIndex property. Below is a snip from D2 help.

if (MessageDlg('Do you want to use the default printer',
    mtInformation, mbYesNoCancel,0)=idYes) then
      Printer.PrinterIndex := -1;
ASKER CERTIFIED SOLUTION
Avatar of Edo082297
Edo082297

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial