Ganz einfach wie du siehst
Gruss
MiniKeks, NSS Team
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
r: TRect;
i: Integer;
begin
memo1.lines.add (''); //Enter
memo1.lines.add (''); //Enter
memo1.lines.add (''); //Enter
memo1.lines.add (''); //Enter
memo1.lines.add (''); //Enter
memo1.lines.add (memo2.text); //Text von Memo2
with Printer do
begin
r := Rect(200,200,(Pagewidth - 200),(PageHeight - 200));
BeginDoc;
for i := 0 to Memo1.Lines.Count do
Canvas.TextOut(200,200 + (i *
Canvas.TextHeight(Memo1.Lines.Strings[i])),
Memo1.Lines.Strings[i]);
Canvas.Brush.Color := clBlack;
Canvas.FrameRect(r);
EndDoc;
end;
end;