Davs
Det er fordi du har glemt en begin; end; blok
procedure TForm1.ToolButton11Click(Sender: TObject);
var
i,col,lin:integer;
begin
If PrintDialog1.Execute then
begin; //Her
col := 0;
lin := 0;
Printer.BeginDoc;
for i := 0 to Memo1.Lines.Count-1 do
begin
Printer.Canvas.TextOut(col,lin, Memo1.Lines);
Printer.Canvas.Font := Memo1.Font;
Printer.Title := Form1.Caption;
lin := lin + 30;
end;
printer.Enddoc;
end; //her
end;
---
Hilsen Anders
[Redigeret d. 21/07-04 20:06:00 af Anders (r0x3r)]
Oh tusind tak
Har lige endnu et problem med den
Incompatible Types: 'String' and 'TStrings'
Koden er nu:
procedure TForm1.ToolButton11Click(Sender: TObject);
var
i,col,lin:integer;
begin
If PrintDialog1.Execute then
begin
col := 0;
lin := 0;
Printer.BeginDoc;
for i := 0 to Memo1.Lines.Count-1 do
begin
Printer.Canvas.TextOut(col,lin,Memo1.Lines);
Printer.Canvas.Font := Memo1.Font;
Printer.Title := Form1.Caption;
lin := lin + 30;
end;
printer.Enddoc;
end;
end;
På forhånd tak
[Redigeret d. 21/07-04 20:37:43 af SystemF]