Imprimindo o conteudo de um memo

Delphi

22/11/2003

Como faço para impromir o conteudo de um memo


Ecmsoftware

Ecmsoftware

Curtidas 0

Respostas

Anjomd

Anjomd

22/11/2003

Tente isto

Procedure TForm1.Button1Click(Sender: TObject);
Var I, Altura : Integer;
sMemo : String;
Bbegin
With Printer Do Begin
Title:= ´Imprimindo memo´;
BeginDoc;
With Canvas Do Begin
Altura := TextHeight(´A´);
For I := 1 To Memo1.Lines.Count Do Begin
sMemo := Memo1.Lines[I];
TextOut(1, (i - 1) * Altura, sMemo);
End;
End;
EndDoc;
End;
End;

Obs.: Incluir a na clásula Uses a Unit Printer


GOSTEI 0
POSTAR