
QB 4.5 Printing to printer LPT2
: I have a QB v 4.5 program I wrote to print a report file written in
:fortran which I used the condensed mode in QB (LPRINT CHR$(15)). I also
:used the statement, LPRINT WIDTH 145. It worked OK until I made my
:default printer LPT2.
:
: I tried to use, OPEN "LPT2" FOR OUTPUT ON #2. This didn't work as I
:couldn't figure out how to use the condensed mode (CHR$) statement. I
:found an example in the manual for the WIDTH statement, WIDTH #2, 145.
:
: Can someone tell me how I can use the CHR$ statement to print in the
:condensed mode for LPT2?
LET Printer = FreeFile
OPEN "LPT2:" FOR OUTPUT AS #Printer
WIDTH #Printer, 145
PRINT #Printer, CHR$(15); ' << Don't forget the semicolon
at the end of the line!
PRINT #Printer, "Stuff you want to print"
etc...
CLOSE #Printer ' Tell the printer when
you've finished all your printing
No doubt 50 other people will rush to tell you this ;-)
Cheers
Derek