Staz Software
HomeFutureBasicSharewareOrderContact

FAQs

How do I print?

Sometimes, important programming tasks seem too complex to master. Printing is one of the things that causes problems for both beginners and experienced programmers. Here are some simple tips to help you get started.

Output is directed to the printer via the ROUTE command.

ROUTE _toPrinter

You may return to the screen using a similar statement.

ROUTE _toScreen

After directing output to the printer, you will be working in an invisible window that is the same size as a printed page. If you want to know the dimensions of the page, you may use standard WINDOW functions.

pgHeight = WINDOW(_height)
pgWdth   = WINDOW(_width)

When you wish to eject a page from the printer, you must close that page.

CLEAR LPRINT

When you are finished with the entire printing job, close the printer driver and eject the final page.

CLOSE LPRINT

Note that the CLOSE LPRINT statement automatically ejects a page. Using CLEAR LPRINT immediately followed by CLOSE LPRINT would cause two pages to be ejected from the printer.

All together...

DIM t,l,b,r
ROUTE _toPrinter
CALL SETRECT(t,0,0,WINDOW(_width),WINDOW(_height))
CALL FRAMERECT(t)
ROUTE _toScreen
CLOSE LPRINT

There is an old call in FutureBASIC II that mimics a QuickBasic statement: LPRINT. While this works as it should, it is very un-Maclike to treat a full page like something coming from an old fashioned dot matrix printer. We recommend using the ROUTE commands.

Appearance: this technique may also be used with the Appearance Runtime.

FutureBASIC

Demo

Order

Tour

Tech Notes

FAQ

Sample Code

Web Sites

Mailing List

System
Requirements

blank