FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

PRINTING

Show document's name in print monitor window


Recently, I asked about the printer structure record. Rick provided me with some information and I found some more. Just to let you people know about the printer structure record, there are several. There is the PrGeneral and the TPrint (which has three internal additional structures). Unfortunately, none of these contain the user's scale. However, the PrGeneral contains the resolution of the printer selected and Tprint contains the resolution of the page. Considering both can give you the user's selection of scale. A lot of trouble for little reward.
However, I did find a slick way (from IM) to name printer documents which may interest some of you. For example:
Have you ever sent a document to a printer and had the "Print Monitor" name the document "unspecified" or "untitled" or a title of one of your windows and you wanted it to be named something else? If so, then do this:
In your print routine, before printing, open a window as follows:

WINDOW 999,"Your Doc Name",(1,1)-(2,2), _dialogPlain

This will send the "Your Doc Name" into the printer structure TPrint --> TPrJob --> pFileName string and thus will appear as the name of the document about to be printed.
Note that the window opens behind your main MENU bar and thus is not visible. Neat huh? And, right out of IM. And, don't forget to close the window.

Tedd