08-03-2022, 08:03 PM
I found this under LPRINT:
In my QBasic program I made extensive use of ESC for font changes, orientation changes, box shading (many times I did these on the same page as needed), etc.,
In QB64, chr$(27) sent to printer only results in a left arrow character.
these are just some:
LPrint Chr$(27); "&l1E"; 'move to top of page
LPrint Chr$(27); "&l64F"; 'set text length to 64 lines
10 courier10$ = Chr$(27) + "(11U" + Chr$(27) + "(s0p10.00h10.0v0s0b3T" ' courier 10 pitch
LPrint courier10$;
12 courier12$ = Chr$(27) + "(11U" + Chr$(27) + "(s0p12.00h10.0v0s0b3T"
LPrint courier12$;
17 courier17$ = Chr$(27) + "(11U" + Chr$(27) + "(s0p16.67h8.5v0s0b0T"
LPrint courier17$;
110 courierbold10$ = Chr$(27) + "(11U" + Chr$(27) + "(s0p10.00h10.0v0s3b3T"
111 LPrint courierbold10$;
210 courierbold12$ = Chr$(27) + "(11U" + Chr$(27) + "(s0p12.00h10.0v0s3b3T"
211 LPrint courierbold12$;
Any way I can send "printer" command codes like these to the printer in QB64 or accomplish the same results in another fashion?
Thanks,
Arnold
- Note: Printer escape codes starting with CHR$(27) will not work with LPRINT and may produce text printing errors.
In my QBasic program I made extensive use of ESC for font changes, orientation changes, box shading (many times I did these on the same page as needed), etc.,
In QB64, chr$(27) sent to printer only results in a left arrow character.
these are just some:
LPrint Chr$(27); "&l1E"; 'move to top of page
LPrint Chr$(27); "&l64F"; 'set text length to 64 lines
10 courier10$ = Chr$(27) + "(11U" + Chr$(27) + "(s0p10.00h10.0v0s0b3T" ' courier 10 pitch
LPrint courier10$;
12 courier12$ = Chr$(27) + "(11U" + Chr$(27) + "(s0p12.00h10.0v0s0b3T"
LPrint courier12$;
17 courier17$ = Chr$(27) + "(11U" + Chr$(27) + "(s0p16.67h8.5v0s0b0T"
LPrint courier17$;
110 courierbold10$ = Chr$(27) + "(11U" + Chr$(27) + "(s0p10.00h10.0v0s3b3T"
111 LPrint courierbold10$;
210 courierbold12$ = Chr$(27) + "(11U" + Chr$(27) + "(s0p12.00h10.0v0s3b3T"
211 LPrint courierbold12$;
Any way I can send "printer" command codes like these to the printer in QB64 or accomplish the same results in another fashion?
Thanks,
Arnold