W
waxu
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Print1Click(Sender: TObject);
var
line:integer;
printtext:system.text;{定义文本打印文件}
begin
printdialog1.options:=[poselection,poprinttofile,pohelp,popagenums];
with printdialog1do
if execute then
begin
AssignPrn(printtext);
rewrite(printtext);
printer.canvas.font:=memo1.Font;
{循环打印文本}
for line:=0 to memo1.lines.count-1do
writeln(printtext,memo1.lines[line]);
closefile(printtext);
end;
end;
出现以下错误:
Undeclared identifier: 'AssignPrn'
Undeclared identifier: 'printer'
不能通过编译,请问问题出现在哪里?
var
line:integer;
printtext:system.text;{定义文本打印文件}
begin
printdialog1.options:=[poselection,poprinttofile,pohelp,popagenums];
with printdialog1do
if execute then
begin
AssignPrn(printtext);
rewrite(printtext);
printer.canvas.font:=memo1.Font;
{循环打印文本}
for line:=0 to memo1.lines.count-1do
writeln(printtext,memo1.lines[line]);
closefile(printtext);
end;
end;
出现以下错误:
Undeclared identifier: 'AssignPrn'
Undeclared identifier: 'printer'
不能通过编译,请问问题出现在哪里?