• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

To Access Paralell Port

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.
1 Solution
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
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!


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.

Thank you,
Moderator @ Experts Exchange
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now