dos like printing in VB .net on dotmatrix printers

hemenkap

Active member
Joined
Jan 22, 2003
Messages
29
Location
Mumbai, India.
hello,

we are migrating from one legacy dos application to a win32 application..

the problem is printing reports, mnajority of our clients use dotmatrix printers..

in dos application the printing is very as it prints character by character.. but in win32 appplication the printing is very slow as the printing is done pixel by pixel..so many of our clients wont prefer that as they generally print bills and stuff like that

is there any way by which we can print with high speed on a dotmatrix printer from win32 application

we are using microsoft visual basic .net to develop the front end
 
There is no way with the classes that are provided to you by default in the framework. You might be able to find a parallel I/O class floating around somewhere, which would give you what you need with regards to the dot matrix printers.

The other alternative is to develop a COM component with VB6 that opens the LPT port for output and writes strings to it, and use that from .NET.
 
Another possibility - though I havent investigated to see if its feasible - would be to create a text file with the data you want to print, then send that file to the desired LPT port. This used to be possible with older windows OSs with a simple Copy command ("copy myfile.txt lpt1:").
 
Thank for your help.
I will surely try it out
i have never made any com objects , this sounds intresting i will surely try some R&D in this field

Thank you once again
Hemen
 
I have the same problem with softs written in PDS basic 7.1 which are migrating in vb.net. Many clients use a dotmatrix printer for printing invoices ...

I dont understand that : these softs work very well in a dos windows under windows XP pro. But win XP pro use windows XP drivers for the printer (e.g. Ibm proprinter II).

Is it possible in vb.net to use also these drivers ?

I think it would be possible with api but i dont know.

Create a text file then edit it with "copy text.txt >lpt1" is not a valid solution for users.

Thanks for your help.
 
Text Only/Generic Printer Driver

If you are printing plan text without any need for formating you can try this.

Install a generic/text only driver for your dot matrix printer. Start>>Settings>>Printers
Add New Printer
Select LPT1 (or the port the printer is connected to)
When you get to the screen to select manf. and driver select Generic under manf. and Text Only under driver/model.
 
Back
Top