Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

To Access Paralell Port

Posted on 1999-07-31
2
Medium Priority
?
169 Views
Last Modified: 2010-04-30
Now i am developing Point of Sales System by using Vb5.
I want to access Paralell port to pass ESC parameters.
In VB, we have Comm Active-X to Access Serial Port.

So, Please Send me the Solution, how to access the Paralell Port and Pass the ESC Parameters by using Vb5. Otherwise i want to know the Which ActiveX to perform this operation.
0
Comment
Question by:thanga
[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 Comments
 
LVL 3

Accepted Solution

by:
kfrick earned 160 total points
ID: 1528756
I have found that you can write the entire printer output to a file, then use the SHELL command to fire the DOS "PRINT" command.....

Sub TestPrint()
  Open "C:\Test.txt" for Output As #1
  Print #1, "This is plain Text"
  Print #1, Chr$(27);Chr$(whatever is Bold);"This is Bold Text"
  Close #1
  Shell "PRINT C:\TEST.TXT"
End Sub

Remember that the Print# statement automatically adds a  Carriage Return Chr$(13) to the line. You may also have to add a Line Feed Chr$(10), depending on your printer. You can also suppres the automatic CR by ending the statement with a semi-colon, like so....
  Print #1, "This is the first line....";
  Print #1, "And so is this!"
This feature can be usefull to mix print styles on the same line....

Hope this helps!
-kf

0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6872229
GREETINGS!

This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

664 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