HTBasic Help
×
Menu
Index

WIN-PRINT

 
WIN-PRINT is built into HTBasic. If a default Windows printer is available, WIN-PRINT will be loaded and assigned to ISC 10 automatically. WIN-PRINT supports OUTPUT, CONTROL, and STATUS (but not ENTER, READIO, WRITEIO, ON INTR, and ENABLE INTR).
 

Selecting a Printer

Printing normally occurs through the Windows Print Manager (ISC 10), but HTBasic supports direct printing through ISC 26. This is helpful when sending escape codes to a printer that the print manager normally removes from the print command.
 
A new print job begins on an ISC after:
 
A print job ends after:
 
To send data to a different printer, change the default printer using the Device Setup dialog or use CONTROL register 102 to access the Printer Setup dialog. You can also change the orientation (portrait or landscape) of the print job, . If the printer does not support the current margin settings, they are automatically adjusted. The following statement causes a Printer Setup dialog box to pop-up.
 
CONTROL 10,102;1 ! Let user choose printer
 

Printing to the Printer

Example:
ASSIGN @Prn TO 10              ! Assign an I/O Path
OUTPUT @Prn;"PI = ";PI         ! Now use the I/O Path
! Insert other printer statements here
ASSIGN @Prn TO *               ! End of print job, print it
END 
 
Windows Print Manager collects printer output into "jobs." and only prints when the job is done. You signal that your print job is done by closing the I/O path as above, or by changing the PRINTER IS device, executing RESET, resetting the interface through control register 0, or writing a value to control register 111. For example:
 
OUTPUT 10;"MAXREAL = ";MAXREAL
CONTROL 10,111;1
END