A
alanzhangxin
Unregistered / Unconfirmed
GUEST, unregistred user!
assignprn(ptext)为何通不过?
d7
procedure TForm1.Button2Click(Sender: TObject);
var
i:integer;
ptext:textfile;
begin
inherited;
if PrintDialog1.Execute then
begin
Assignprn(ptext);
Rewrite(ptext);
try
with printerdo
Canvas.Font:=Memo1.Font;
for i:=0 to memo1.Lines.Count-1do
writeln(ptext,memo1.lines);
finally
CloseFile;
end;
end;
end;
d7
procedure TForm1.Button2Click(Sender: TObject);
var
i:integer;
ptext:textfile;
begin
inherited;
if PrintDialog1.Execute then
begin
Assignprn(ptext);
Rewrite(ptext);
try
with printerdo
Canvas.Font:=Memo1.Font;
for i:=0 to memo1.Lines.Count-1do
writeln(ptext,memo1.lines);
finally
CloseFile;
end;
end;
end;