11-23-2003, 06:42 AM
Quote: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.Getting back to the origian issue....
I know that there are Dos interupts for this, but I can't seem to recall what they are....
1) First of all, the text would best be in text mode. With a lot of extra work, you could print graphics, but that will complicate your program.
2) The post by Antoni, about escape sequences, is the only way that I know that you can print text in colors. There are no so-called "DOS interrupts" to do this for you.
3) I have a HP Laserjet 4 manual which includes a full set of escape sequences. However, this particular HP printer does not print colors. The closest thing to colors are "shades of gray" for which this manual has a bunch of options. If you're using an HP printer, and shades of gray seems ok, then let me know and I'll send you the corresponding escape sequences.
4) Another alternative, depending on how often you need to run these text producing programs, is to output the text to a flat file (text file). Then import the text file into MS-Word and color the text to your heart's content, and also maybe select different fonts. Then print it out on the color printer. This means a little extra manual intervention, but the results will be real pleasing.
5) Also, if you're real handy with Excel, you could set up an Excel spreadsheet with some macros which would input your text file, color it, and print it out. You would probably need to "flag" the text lines in some manner to tell Excel what colors you want. I'm not good at Excel, but have seen guys do similar things.
In any event, good luck! You have chosen a sticky problem.
*****