home *** CD-ROM | disk | FTP | other *** search
- /***
- *
- * Print.prg
- * Sample user-defined functions for controlling the printer
- * Copyright, Nantucket Corporation, 1990
- *
- * NOTE: compile with /n/w/a/m
- */
-
- #include "Set.ch"
-
-
- /***
- * PrintCodes( <cCtrlCode> ) --> NIL
- * Send control codes to the printer without affecting printhead position.
- *
- * Usage:
- * PrintCodes( CHR(27)+"E" )
- * ?? "Some Text"
- * PrintCodes( CHR(27)+"F" )
- * ?? "More Text"
- *
- */
- PROCEDURE PrintCodes( cCtrlCode )
- LOCAL nRow := PROW()
- LOCAL nCol := PCOL()
- LOCAL lPrinter := SET(_SET_PRINTER, .T.) // SET PRINTER ON
- LOCAL lConsole := SET(_SET_CONSOLE, .F.) // SET CONSOLE OFF
-
- ?? cCtrlCode
-
- SETPRC(nRow, nCol)
- SET(_SET_PRINTER, lPrinter) // Restore printer setting
- SET(_SET_CONSOLE, lPrinter) // Restore console setting
-
- RETURN
-
-