//--------------------------------------------------------------------------- #include #pragma hdrstop #include "YarnPrint_F.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "RzButton" #pragma resource "*.dfm" TYarnPrintForm *YarnPrintForm; //--------------------------------------------------------------------------- __fastcall TYarnPrintForm::TYarnPrintForm(TComponent* Owner) : TForm(Owner) { lbPrinter->Caption = IDS_COMMON_PRINTER + " : "; TPrinter *printer = Printer(); if (printer->Printers->Count == 0) return; lbPrinter->Caption += printer->Printers->Strings[printer->PrinterIndex]; } //--------------------------------------------------------------------------- void __fastcall TYarnPrintForm::BtnPrinterSetupClick(TObject *Sender) { TPrinter *printer = Printer(); if (printer->PrinterIndex == -1) return; PrinterSetupDialog1->Execute(); lbPrinter->Caption = IDS_COMMON_PRINTER + " : " + Printer()->Printers->Strings[Printer()->PrinterIndex]; } //---------------------------------------------------------------------------