Delphi Programming

  1. Home
  2. Computing & Technology
  3. Delphi Programming

TMemo printing

By Zarko Gajic, About.com

Simple procedure that prints the content of a Memo component...

~~~~~~~~~~~~~~~~~~~~~~~~~
uses printers;

procedure TForm1.PrintIt(Sender: TObject) ;
var
   PrintBuf: TextFile;
j : integer;
begin
   AssignPrn(PrintBuf) ;
   Rewrite(PrintBuf) ;
   try
     for j := 0 to Memo1.Lines.Count-1 do
       WriteLn(PrintBuf, Memo1.Lines[j]) ;
   finally
     CloseFile(PrintBuf) ;
   end;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~
Here are some more TMemo related articles: TMemo to the Max

Delphi tips navigator:
» Determine the actual size of a Blob field in a Table
« TMediaPlayer: What track am I on?

Zarko Gajic
Guide since 1998

Zarko Gajic
Delphi Programming Guide

Explore Delphi Programming

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Delphi Programming

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Using VCL Components
  5. TMemo, TRichEdit
  6. TMemo printing

©2009 About.com, a part of The New York Times Company.

All rights reserved.