to know if the printer prints in recto/verso

Please discuss general Delphi programming topics here.

to know if the printer prints in recto/verso

Postby Mirage » November 15th, 2005, 9:08 am

hello
I used the following code to know if the printer to declare by defect can print in recto/verso or not:
label1.caption:=inttostr(DeviceCapabilities(Device, Port, DC_DUPLEX, nil, nil));
but there remain a problem of execution "device and port not to declare" how I can declare device and port?
thank you
User avatar
Mirage
Junior Member
Junior Member
 
Posts: 44
Joined: October 26th, 2005, 11:41 am

Postby Kambiz » November 15th, 2005, 1:40 pm

The following call gathers parameters of the selected printer by Printer.PrinterIndex:

Code: Select all
Printer.GetPrinter(Device, Driver, Port, DeviceMode);

where:

Code: Select all
Device, Driver, Port: array[0..MAX_PATH] of Char;
DeviceMode: THandle;
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron