home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP13.EXE / CHP1354.PRG < prev    next >
Encoding:
Text File  |  1991-06-12  |  1.1 KB  |  41 lines

  1. /*
  2.    Listing 13.54 Saving and Restoring Virtual Screens
  3.    Author: Greg Lief
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11. //───── NOTE: must compile with the /N option!
  12.  
  13. #include "box.ch"
  14.  
  15. #xtranslate drawbox( <color>, <t>, <l>, <b>, <r>, <fill> ) => ;
  16.             dispbox(<t>,<l>,<b>,<r>,B_SINGLE + <fill>,<color>)
  17.  
  18. /*
  19.    BLINKEY() - Flashing alternate screens
  20. */
  21. function blinkey
  22. local x, screens := {}
  23. dispbegin()
  24. setcursor(0)
  25. drawbox('w/b', 0, 0, maxrow(), maxcol(), '1')
  26. drawbox('w/r', 5, 5, 17, 74, '2')
  27. aadd(screens, savescreen(0, 0, maxrow(), maxcol()))
  28. drawbox('w/r', 0, 0, maxrow(), maxcol(), '1')
  29. drawbox('w/b', 5, 5, 17, 74, '2')
  30. aadd(screens, savescreen(0, 0, maxrow(), maxcol()))
  31. dispend()
  32. do while inkey(.2) == 0
  33.    x := if(x == 1, 2, 1)
  34.    dispbegin()
  35.    restscreen(0, 0, maxrow(), maxcol(), screens[x])
  36.    dispend()
  37. enddo
  38. return nil
  39.  
  40. // end of file CHP1354.PRG
  41.