FMX.Printer.Win.TPrinterWin.SetPrinter
Delphi
procedure SetPrinter(ADevice, ADriver, APort: PChar; ADeviceMode: THandle);
C++
void __fastcall SetPrinter(System::WideChar * ADevice, System::WideChar * ADriver, System::WideChar * APort, NativeUInt ADeviceMode);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FMX.Printer.Win.pas FMX.Printer.Win.hpp |
FMX.Printer.Win | TPrinterWin |
Description
Specifies the current printer.
Call SetPrinter to change the current printer.
ADevice specifies the device name of the new printer. This is the name that appears in the Print Manager (for example, "Epson FX-80"). It is not the printer model name.
ADriver specifies the driver name for the new printer (usually WINSPOOL).
APort is included for backward compatibility. It should be set to an empty string.
DeviceMode is the handle to a memory buffer device-specific initialization data for the device driver. This handle can be obtained by calling the GlobalAlloc function to allocate a DeviceMode record (Delphi) or DEVMODE structure (C++).