Code.GeekInterview.com
  I am new, Sign me up!
 
Home Tech Tutorials

DOS mode Printing to print bill using Dot-Matrix Printer in VB.

     Published: 2nd Sep 2006     Read: 14159 times
Category: Tech Tutorials
Add Comment
 




It is necessary and also very easy to print the report in DOS mode using VB.
Why should we print in DOS Mode?
1. The Reports like Billing will consume time when the customers are waiting for bills.
2. Economic. Means if you print windows based report in Dot Matrix printer the printer head, ribbon and catrdge will not last long. Which is expensive.
3. Small companies prefer DOS base printing.

How to do?
1. Create a text file in overwrite mode and redirect your data into the text file.
2. Again create another batch file(extension .BAT) and write the DOS commands like 'TYPE report.txt > PRN' which will send the data inside the textfile(Your report file) to the printer. Do not forget to write EXIT command in the batch file to exit after printing.
3. Execute the batch file by using SHELL command through VB.

How to give your Report better look and feel?
I would like to advise you to get a printer manual provided with your DOT Matrix Printer and follow the printing keys. Let me say that you want to make your header message in the report bold and larger size. Just follow the ascii characters and write them both at the beginning and end of the title/text which you want to make change. Like that you can make italic, compress and fatened the text for your better look and feel. But please waste some paper to gain the experience before work professionally.

Thanks. If any queries please mail me at tapanshanty@yahoo.co.in. I will be happy if I can provide you the source code for it.


Comments

I Want To Print Via Dot Matrix Printer
On LPT Port So Please Give Me Code For That.

Thanking You
Ankur Patel
Comment posted by: on 2008-09-04T01:12:54
I want to print address on envelop in a vb application. Can I have your code?
Comment posted by: on 2008-09-07T02:13:50
I want Vb6 code for DOS mode Printing to print bill using Dot-Matrix Printer
Comment posted by: on 2008-09-18T03:47:50
I want to continous print like slip, Bill, etc, in dos base
Comment posted by: on 2008-07-24T07:04:21
Hi, I am facing a problem when printing in dos that. when I give dos command "Print " then it print the page and ejects the whole page at once. But in printing bill I need to say a stop just after it finishes text. So, Please tell me appropriate dos batch script to do me this work. I will be very thankful to you. I know this is not a big thing for you. I need it at the earliest. With a lot of thanks and good wishes.
Comment posted by: Jai Singh on 2008-11-12T06:49:50


Next: ADO.net Programming Style Article with Demo Code



Post Comment


Members Please Login

Name:
Email: (Optional)
 (Used for Notification)
Title:
Comment:
Validation Code:
 <=>  (Enter this code in text box)


Subscribe

 


About Us -  Privacy Policy -  Terms and Conditions -  Contact  

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape