Solved

How to access to LPT Port

Posted on 1998-09-14
4
317 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 50 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

Independent Software Vendors: 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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 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