Autor Beitrag
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Fr 20.12.02 16:43 
Hallo
Mit welcher procedure kann ich ein Memo drucken?
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: So 22.12.02 04:03 
Zum Beispiel so:

- Printdialog
- Button
- Memo


ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
uses ..., Printers;

TForm1.Button1Click(Sender: TObject);
var
Line: Integer;
PrintText: TextFile; 
begin
if PrintDialog1.Execute then
begin
AssignPrn(PrintText);
Rewrite(PrintText); 
Printer.Canvas.Font := Memo1.Font;
for Line := 0 to Memo1.Lines.Count - 1 do
Writeln(PrintText, Memo1.Lines[Line]); 
CloseFile(PrintText); 
end;

_________________
If accidentally read, induce vomitting.
Andreas L. Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: So 22.12.02 11:32 
Danke, funktioniert super!
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: So 22.12.02 15:42 
Keine Ursache, schließlich ist ja bald Weihnachten. :wink:

_________________
If accidentally read, induce vomitting.
Cyrus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 56



BeitragVerfasst: Mo 23.12.02 11:34 
Du kannst auch ein QRMemo verwenden.
Erstelle einen QuickReport auf deiner form auf diesen QReport haust du noch ein QRBand drauf. Auf dieses Band haust du dann ein QRMemo.
nun hast du eine Optimalen druck (mit voransicht)

Qreport1.print; zum drucken
Qreport1.preview; für die Voransicht

Greez Cyrus

_________________
Wer glaub er ist, hört auf zu werden!
Delphi Rulez!!!