QB 4.5 Printing to printer LPT2 
Author Message
 QB 4.5 Printing to printer LPT2

HI,

   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?

Thank you,

Jim Roberts


     or



Wed, 07 Nov 2001 03:00:00 GMT  
 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



Wed, 07 Nov 2001 03:00:00 GMT  
 QB 4.5 Printing to 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?
print #2,chr$(15);

Net-Tamer V 1.08X - Test Drive



Thu, 08 Nov 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. QB 4.5 Printer Commands

2. QB 4.5 Printing Problems on Novell LAN

3. Printing VGA graphics in QB 4.5

4. QB 4.0 Docs/QB 4.5 Wanted

5. want QB 4.5 QB 7.1 FOR FREE!!!

6. Where's QB.LIB in QB 4.5?

7. Printing QBASIC files onto lpt2 printer

8. Printing to printer on LPT2 won't work

9. QB 4.5: reading 16 bit from a port

10. QB 4.5 - Expression too complex

11. Incorporating non-QBasic graphics into QB 4.5 programs

12. WTB: QB 4.5 Book!

 

 
Powered by phpBB® Forum Software