Qbasicnews.com

Full Version: Printing in color to a printer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I need to know if anyone knows how to print to a color printer in color from qb. Preferably(sp?) in text mode.The program needs to be small as I will be adding it to some of my other programs.
I know that there are Dos interupts for this, but I can't seem to recall what they are. Hopefully someone can help me.

Thanks in advance
The "features" of a printer are commanded by escape sequences, strings of characters starting by a non printable one. You can send escape sequences thru the LPRINT instruction. So nothing difficult in QB's side.

Each brand uses its escape sequences, you will have to find them for your brand and model of printer (check the manufacturer's site).
Some manufacturers don't publish lists of escape sequences, as DOS is supposed to be dead and Windows programmers rely on Windows drivers to send them... So good luck...
It's always fun to hack around with it and figure out such stuff on one's own though Big Grin
What you need is specifications of the printer or some kinda acess to the printer's driver.
Quote:access to the printer's driver.
Right... windows drivers in QB? I don't know any routine, function, subprocedure that is able to link to a SYS or DLL file Smile

About DOS drivers, AFAIK, they can be accessed, by some interrupt (printer-dependant) or port.
Well, there's DosPrint if you have $100 to shell out. There's also DosPrinter, which is almost the same, except it's only $40. Both have free evaluation versions, and they work pretty good.
Or he can write a driver for the printer if he knows C =)
how would you go about doing that?
Get the printer specs from the manufacturer and start coding in C, what else?
Ok, that's nothing I guess. But try to make it compatible with some OS... Wink
Pages: 1 2 3