home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 13.54 Saving and Restoring Virtual Screens
- Author: Greg Lief
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- //───── NOTE: must compile with the /N option!
-
- #include "box.ch"
-
- #xtranslate drawbox( <color>, <t>, <l>, <b>, <r>, <fill> ) => ;
- dispbox(<t>,<l>,<b>,<r>,B_SINGLE + <fill>,<color>)
-
- /*
- BLINKEY() - Flashing alternate screens
- */
- function blinkey
- local x, screens := {}
- dispbegin()
- setcursor(0)
- drawbox('w/b', 0, 0, maxrow(), maxcol(), '1')
- drawbox('w/r', 5, 5, 17, 74, '2')
- aadd(screens, savescreen(0, 0, maxrow(), maxcol()))
- drawbox('w/r', 0, 0, maxrow(), maxcol(), '1')
- drawbox('w/b', 5, 5, 17, 74, '2')
- aadd(screens, savescreen(0, 0, maxrow(), maxcol()))
- dispend()
- do while inkey(.2) == 0
- x := if(x == 1, 2, 1)
- dispbegin()
- restscreen(0, 0, maxrow(), maxcol(), screens[x])
- dispend()
- enddo
- return nil
-
- // end of file CHP1354.PRG
-