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: So 10.11.02 11:35 
Hallo,
ich hab mal wieder eine leichte Frage, wie kann ich ein Memo- bzw. RichEdit-Feld drucken.

Wäre glücklich wenn mir jemand die procedure schnell geben könnte.

DANKE
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: So 10.11.02 12:31 
Also, 1. hättest du einfach mal suchem müssen(hier im Forum), und du wärest auf einige Sachen gestosen. Da du ein Neuling bist seihe es dir verziehen :roll:

Also, ich würde das ganze so anpacken:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
var 
  F: TextFile; 
  i: integer;
begin 
  AssignFile(F, 'LPT1');// LPT2,COM1,COM2... 
  Rewrite(F);
  for i:=0 to Memo1.Lines-1 do 
  Writeln(F, Memo1.Lines[i]); 

  CloseFile(F); 
end;

(Abgeändert von einem Beitrag auf [url=www.swissdelphicente...lphiCenter.ch[/url])

Müsste funktionieren, kanns aber nicht garantieren. Musst halt noch den Druckerport wählen.
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 10.11.02 13:13 
Danke für die Antwort, hab aber was besseres gefunden:

begin
if PrintDialog1.Execute then
Memo1.Print(PathName);
end;
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: So 10.11.02 13:15 
Okay, auch gut.
DT2158
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: So 10.11.02 16:16 
onz variante funktioniert wahrscheinlich aber auch ohne druckertreiber!
Ich habs selbst nicht probiert, vermute bloß, da zusammenhang zu TP
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: So 10.11.02 16:58 
Das mit .print hatte ich bei mir mal probiert, des gabs aber nicht. Du kannst es ja mal mit beiden Methoden versuchen, und dann entscheiden, wellche schneller und besser funktioniert.