Does anyone know how I can solve this problem:
I am making a program which prints a single Log line to a printer every time a transaction is completed.
How can I make VB print one line and not advance the page afterwards (like QBasic used to print)?
Printable View
Does anyone know how I can solve this problem:
I am making a program which prints a single Log line to a printer every time a transaction is completed.
How can I make VB print one line and not advance the page afterwards (like QBasic used to print)?
This will do:
Code:Printer.Print "text"
Printer.EndDoc
Actually he said he does not want the page to advance, so do not use the EndDoc method.
What happens when you print is that the picture of what you want to print is set up in memory, nothing is actually sent to the printer until you use EndDoc, which lets the printer object know that you have finished composing the document, and it is ok to print.
So you do use as Matthew pointed out, the Printer.Print "text" method. However, do not call EndDoc until you want to actually print the page.
If you mean how do you get it to print a line, and then not spit out the page, but wait at the next line, then i have no idea.
Yeah i know the basics of printing from VB, I just want it to print imediately without advancing the page. like QBasic printing, where the page isnt ejected it just stops at the last line.