Microsoft KB Archive/34352

From BetaArchive Wiki

Article ID: 34352

Article Last Modified on 1/9/2003


  • Microsoft QuickBasic Compiler for Macintosh 1.0

This article was previously published under Q34352


This article describes how to send screen graphics to an Apple ImageWriter or LaserWriter printer. This information is taken from the README file on the release disk for Microsoft QuickBasic Version 1.00 for the Apple Macintosh. (The exception is that "Utility SUBs" in the "Screen Dumps" section of the original README is incorrect; the text should actually refer to the "Utility Subprograms" file. This correction has been added below.)


Additional Information on Printing Graphics

Printing Graphics is the same as printing to the screen. Use WINDOW OUTPUT #n after opening the printer, and all graphic calls (except BACKPAT) will go to the printer. LINE (0,0)-(551,729),,b will outline the drawable area on a LaserWriter page when printed at 100%.

If you want to print the window contents, record a picture as you draw the screen, then replay the picture to the printer. Follow this general outline:

       PICTURE ON :SHOWPEN  'make drawing visible
       '       draw the window contents
       '       (PICTURE and PUT work here, too!)
       OPEN "lpt1:prompt" FOR OUTPUT AS #1
       PICTURE ,windowPic$
       CLOSE #1

You can also use the resulting picture to refresh the screen. Pictures are usually more compact than GET arrays and preserve color in addition to printing faster on a LaserWriter.

Screen Dumps

Use the "PrintScreen" subprogram in the "Utilities Subprograms" file to send a copy of your screen to a printer. Unlike LCOPY, this works for color screens and LaserWriters. "PrintScreen", along with a "PrintWindow" subprogram, is in the "Utility Subprograms" file in the "QB Demos" folder on the Examples disk.


"Calendar" on the Examples disk contains sample graphics printing.

Additional query words: MQuickB readme docerr

Keywords: KB34352