Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to access to LPT Port

Posted on 1998-09-14
4
Medium Priority
?
322 Views
Last Modified: 2010-04-06
I need to know how I can access directly to the LPT-Port in Delphi 3.0 We developed a program in Borland Pascal 7.0 and then transfered it to Delphi. In Pascal we used the "port" command. So what do we use in Delphi ?
0
Comment
Question by:sacky
  • 2
4 Comments
 
LVL 2

Expert Comment

by:kjteng
ID: 1339727
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1339728
Do you need it for printing text???
0
 
LVL 10

Accepted Solution

by:
Jacco earned 100 total points
ID: 1339729
Use AssignPrn like this

procedure Print;
var
  F: TextFile;
begin
  AssignPrn(F);
  Rewrite(F);
  WriteLn(F,'Hello world');
  System.CloseFile(F);
end;

You can write escape codes like this:

Write(F,#27#12)

Regards Jacco
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1339730
Hello...just for an idea you could alos use this...

procedure Print;
   var
     F: TextFile;
   begin
     AssignFile(F, 'LPT1');
     Rewrite(F);
     WriteLn(F,'Hello world');
     CloseFile(F);
   end;

Haven;t tasted that but you could give it a shot ;->
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question