Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- MICROSYS C & Clipper Functions - <b>pickprinter()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
pickprinter()


Syntax:     pickprinter()

Purpose:    Allow user to select a different printer

Arguments:  None

Returns:    NIL

Note:       pickprinter() saves the current screen, displays a pick
            list of printers, saves the new printer selection to the
            user database, loads the newly selected printer's escape
            codes into pEc, and restores the current screen.
            pickprinter() can only be called after cfgmemvar() and
            userconfig()!

            Printer Escape Codes

               pEc[1] == name
               pEc[2] == port
               pEc[3] == file name to redirect to
               pEc[4] == network destination
               pEc[5] == double wide on
               pEc[6] == double wide off
               pEc[7] == italics on
               pEc[8] == italics off
               pEc[9] == bold on
              pEc[10] == bold off
              pEc[11] == pica
              pEc[12] == elite
              pEc[13] == superscript on
              pEc[14] == superscript off
              pEc[15] == subscript on
              pEc[16] == subscript off
              pEc[17] == underline on
              pEc[18] == underline off
              pEc[19] == compressed on
              pEc[20] == compressed off
              pEc[21] == draft
              pEc[22] == letter quality
              pEc[23] == ibm extended character set
              pEc[24] == portrait
              pEc[25] == landscape
              pEc[26] == form length 8
              pEc[27] == form length 11
              pEc[28] == form length 14
              pEc[29] == lines / inch = 6
              pEc[30] == lines / inch = 8
              pEc[31] == user field 1
              pEc[32] == user field 2
              pEc[33] == initialization string
              pEc[34] == termination string

Library:    TC_SYS.LIB

----------------------------------- Example ----------------------------------

   // start of program
   setenv(.t.)

   if( !cfgmemvar() )
       b_errmsg(12," Unable to open configuration file! ","15/1")
       eoj()
   endi

   if( !userconfig(@pEc) )
       b_errmsg(12," Unable to open user file! ","15/1")
       eoj()
   endi

   // anywhere down in code
   pickprinter()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson