Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RLIB 3.0a Reference - <b>function:</b> setcursor() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function:    SETCURSOR()

Purpose:     Retrieve and optionally set the current cursor state.

Syntax:      SETCURSOR( value )

Arguments:   value       - Optional numeric argument to cause the cursor
                           state to be  changed.  <value> may be either a
                           numeric value where 1 indicates the cursor
                           should be turned ON and a value of 0 indicates
                           the cursor should be turned OFF.  <value> may
                           optionally be a logical type value where a
                           value of True (.T.) causes the cursor to be
                           turned ON and a value of False (.F.) causes the
                           cursor to be turned OFF.

Returns:     The current SETCURSOR() state as a numeric value where a
             value of one (1) means the cursor is currently ON, and a
             value of zero (0) means the cursor is currently OFF.

Description: SETCURSOR() is an environment function used to be able to
             make functions "black boxed" such that they may return the
             system state to the way it was after having made a change.
             If used consistently throughout an application, SETCURSOR()
             provides a facility to retrieve the current state of the
             cursor, optionally setting it on or off.

Notes:       SETCURSOR() maintains the current state of the cursor via a
             PUBLIC memvar named RLIBCURSOR.  If this variable does not
             exist as a Numeric type variable, it is created and
             initialized to True (assuming the cursor is ON by default).

             Several RLIB functions such as BOXASK() will detect if the
             SETCURSOR() function is being used to control the cursor
             state by testing if the public variable RLIBCURSOR exists as
             a numeric type variable.  If it does exist, BOXASK() will
             turn the cursor ON (to query the user for a keypress) then
             restore the cursor to its incoming state on exit.

             The SETCURSOR() only exists in the Summer'87 version of RLIB
             since Clipper 5.0 has a built in SETCURSOR() function.

Example:     *-- save the current cursor state and turn it on
             incursor = SETCURSOR(1)   && or SETCURSOR(.T.)
             WAIT "Press 'Y' for Yes or 'N' for No:" TO answer
             SETCURSOR(incursor)
             IF answer = "Y"
                *-- do whatever for a yes answer
             ENDIF

Source:      RL_SETCU.PRG

See also:    BOXASK()

See Also: BOXASK()

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