Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>prnhandle() - get/set the printer handle</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     prnhandle() - get/set the PRINTER handle
  Usage:    [<integer>] = prnhandle([<handle>])
  Params:   integer <handle> from a previous fopen() or fcreate()
  Returns:  integer equal to the current handle in use by the
            Clipper TO PRINT option, normal printer handle is 4

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

            This example opens a text file with fopen(), and then
            uses prnhandle() to append the text to a file instead of
            to the printer. Since you can control the file pointer
            position using the low level DOS file functions, you have
            greater control over the position of the text than you do
            with SET DEVICE TO or SET PRINTER TO.

                 handle = fopen("report.txt")
                 fbot(handle)
                 prnhandle(handle)
                 LIST FNAME+LNAME+ADDRESS to PRINT
                 fwrite(handle,"END OF REPORT****")
                 fclose(handle)
                 prnhandle(4)   && restore printer to normal

  Note:     When you pass a file handle to prnhandle() all Clipper
            commands using the TO PRINT option will be redirected to
            the file associated with that handle.


See Also: althandle()

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