if (dlgPrint->Execute()) { TPrinter *Prntr=Printer(); Prntr->BeginDoc(); Form1->PaintTo(Prntr->Handle, 0, 0); Prntr->EndDoc(); }