Board index » delphi » Configuration Parallel Port in Delphi Pascal

Configuration Parallel Port in Delphi Pascal

Which is the command to configure the parallel port in Delphi Pascal 3.0.
The os we use is WINDOWS 98.
We don't want to use the CANVAS for the printer.

Thx.

Guidodehaem...@hotmail.com

 

Re:Configuration Parallel Port in Delphi Pascal


Go to the Delphi Super Page and look for a comm component, there are lots
out there.

http://sunsite.icm.edu.pl/delphi/

Otherwise, look at using windows.api functions

Quote
olx05125 wrote in message <7doinr$f...@trex.antw.online.be>...
>Which is the command to configure the parallel port in Delphi Pascal 3.0.
>The os we use is WINDOWS 98.
>We don't want to use the CANVAS for the printer.

>Thx.

>Guidodehaem...@hotmail.com

Re:Configuration Parallel Port in Delphi Pascal


If you just want to write it (print something in text mode) just use
AssignFile with port name:
var Lst : system.text;
begin
  AssignFile(Lst, 'LPT1'); {or LPT2 or COM1 for serial printer}
  Rewrite(Lst); {open it}
  writeln(Lst,' Some stuff');
  Close(Lst); {flush it}
end;

If the printer is not ready/present/any error, write statement will raise an
exception in $I+ state, in $I- state check the IOResult variable.

--
----------------------
Regards
Robert Cerny
Remove both qwe when replying
email: robert.qwe.ce...@neosys.xrs.qwe.si

No questions via email, unless explicitly invited.

Quote
olx05125 wrote in message <7doinr$f...@trex.antw.online.be>...
>Which is the command to configure the parallel port in Delphi Pascal 3.0.
>The os we use is WINDOWS 98.
>We don't want to use the CANVAS for the printer.

>Thx.

>Guidodehaem...@hotmail.com

Other Threads