You can print to dot matrix "graphically", which is built-in in Windows, albeit slower.
But if you only want to print pure text with simple formattings, you need to send escape commands to your dot matrix printer, which is faster than graphical printing. Different printers has different escape commands.
Here are typical escape commands(for epson): http://www.printfil.com/manualen/c5.htm
This might help: https://web.archive.org/web/20051212193242/http://sacpcug.org:80/archives/0306/prc0603.html
What I do in VB6 then was to print to Generic / Text Only printer, you open the PRN or LPT1 as a file handle, then print escape commands on the file handle, all escape commands will be redirected to whatever printer is attached to LPT1 or PRN. You can do the same thing with C#, just open the PRN or LPT1 as a file, then print to it.
To add Generic / Text Only printer, Control Panel > Printers > Add Printer. On manufacturer, select Generic, then on printers, select Generic / Text only.
You can do the same (printing on Generic / Text Only) for Zebra printers which have their own escape commands for printing bar codes, which is faster than letting Windows print to it graphically.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…