Board index » cppbuilder » TPrinter.... Printer Selection
Trevor Stockill
![]() CBuilder Developer |
TPrinter.... Printer Selection2007-01-21 12:23:59 AM cppbuilder86 Hi Guy's, I need to select a different printer to the default during the course of a progam. Currently PrinterIndex is set to-1 (default). It is not feasable to use a printdialog box. SysPrinter->Printers returns a list of 5 printers. If anyone could point me to how best to obatin the PrinterIndex for a printer in this list I would be very much obliged. SysPrinter=Printer(); SysPrinter->PrinterIndex=-1; // default PixPerMilY=SysPrinter->PageHeight/282.0; PixPerMilX=SysPrinter->PageWidth/202.0; SysPrinter->Canvas->Brush->Color=clWhite; SysPrinter->Canvas->Pen->Color=clBlack; SysPrinter->Canvas->Pen->Width=Hpset(0.2); SysPrinter->Orientation = poPortrait; SysPrinter->Canvas->Font->Name="Times New Roman"; Thanks in anticipation Trevor. |