Home
Tech TutorialsDOS mode Printing to print bill using Dot-Matrix Printer in VB.
Published: 2nd Sep 2006 Read: 14159 times
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
On LPT Port So Please Give Me Code For That.
Thanking You
Ankur Patel