ex.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
PRINTER Object and PrintTarget Property Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' This example shows how the PRINTER object and the PrintTarget property
' can be used.
 
' When you run the example, type a short sentence in the text box first, then
' choose the command button to print. (Note: Your printer must be set up to
' print on LPT1: before you run this example.)
 
' To try this example:
' 1. Choose New Project from the File menu
' 2. Choose New Form from the File menu to create a form with:
'    • A wide text box
'    • Command button
' 3. Press Alt+F4 to return to the programming environment
' 4. Copy the code example below to the form module
' 5. Press F5 to run the example
 
 COMMON SHARED Sentence$
 
 SUB Command1_Click ()
     PRINTER.PrintTarget = "LPT1"
     PRINTER.PRINT Sentence$
 END SUB