
(*
 Delphi Object and Component Reference
# {bmc bm18.BMP} {bmc bm9.BMP} Printer, Canvas, PageWidth, PageHeight example
This example uses a button and a memo on a form. When the user clicks the button, the content of the memo is printed, with a 200-pixel border around the page. To run this example successfully, include <Printers.hpp> in your unit file.
*) 
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  TPrinter Prntr = Printer();
  TRect r = Rect(200,200,Prntr->PageWidth – 200,Prntr->PageHeight – 200);
  Prntr->BeginDoc();
  Prntr->Canvas->TextRect(r, 200, 200, Memo1->Lines->Text);
  Prntr->EndDoc();
} 
