[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 R_OpnBar() 
 Opens and displays a progress bar
------------------------------------------------------------------------------

 Syntax
        aBar := R_OpnBar ( cHeader [, cFooter [, nRow [, nColumn
                   [, cBoxCol [, cBarCol ] ] ] ] ] )

 Arguments
        cHeader         Header text for bar

        cFooter         Footer text for bar

        nRow            Upper left corner row for bar (default = 10)

        nColumn         Upper left corner column for bar (default = 13)

        cBoxCol         Colour string used to draw the box
                        (default = 'W+/B')

        cBarCol         Colour string used to draw the bar
                        (default = 'GR+/B')

 Returns
        aBar            Opened progress bar

 Description
        Opens and displays a progress bar.
        The bar can be updated using the R_UpdBar () function and should        be closed
        using the R_ClsBar () function.

        +----------------------------------------------------------------+
        |                         -+- CAUTION -+-                        |
        |                                                                |
        |     IN THE UN-REGISTERED  VERSION OF RBARLIB THE FOLLOWING     |
        |     REGISTRATION MESSAGE WILL BE DISPLAYED AT RANDOM TIMES     |
        |     (WHILE EXECUTING THE R_OPNBAR() FUNCTION) :                |
        |                                                                |
        |     Unregistered version of RBarLib - Wait for 8 seconds.      |
        |                                                                |
        |       AFTER A 8 SECONDS DELAY THE PROGRAM WILL CONTINUE.       |
        +----------------------------------------------------------------+

 Example
        *-- Process the file DEMO.DBF

        USE Demo NEW

        *-- Prevent zero-division
        nRecs   := IF ( LastRec () = 0, 1, LastRec () )
        nRecCnt := 0

        aBar    := R_OpnBar ( ' PROCESSING FILE ' )

        DO WHILE !Eof ()

                [ ... ]
                *-- Process records
                [ ... ]

                *-- 100 * nRecCnt / nRecs = percentage processed
                R_UpdBar ( aBar, 100 * ++ nRecCnt / nRecs )

                dbSkip ()

        ENDDO

        R_ClsBar ( aBar )

        More examples can be found in the demo program RBarDemo.PRG.


See Also: R_UpdBar() R_ClsBar() Registration
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson