can't continuous printing by LPT
Original Reporter info from Mantis: lingling
-
Reporter name:
Original Reporter info from Mantis: lingling
- Reporter name:
Description:
this code work in delphi was right, but when in lazarus,it is can only print once,must close the program, then run it again, it is can print a once again.the printer driver was not install, why , why? any time ,any code,any where ,it is always error.
procedure TForm1.Button1Click(Sender: TObject);
var
Prn: TextFile;
i: word;
sl:TStrings;
begin
Assignfile(Prn,'LPT3');
try
Rewrite(Prn);
for i := 0 to Memo1.Lines.Count - 1 do
writeln(Prn, Memo1.Lines.Strings[i]);
except
on EInOutError do
MessageBox(Handle,PChar('print error!'),'hint',MB_ICONEXCLAMATION or MB_OK);
end;
CloseFile(Prn);
end;
Mantis conversion info:
- Mantis ID: 20481
- Fixed in version: 3.0.0
- Fixed in revision: 19532 (#3c0256bd)