home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a067 / 1.img / GRUMP501.EXE / BLANK2.PRG < prev    next >
Encoding:
Text File  |  1991-04-23  |  1.2 KB  |  47 lines

  1. /*
  2.    Program: BLANKSCRN()
  3.    System: GRUMPFISH LIBRARY
  4.    Author: Greg Lief
  5.    Copyright (c) 1989, Greg Lief
  6.    Clipper 5.x Version
  7.    Compile instructions: clipper blank2 /n/w/a
  8.  
  9.    Blanks the screen to prevent monitor wear and tear during inactivity
  10.    Designed for use with GET-IT's N_NOKEY() function
  11.  
  12.    GET-IT is a trademark of Communications Horizons.
  13. */
  14.  
  15. //───── begin preprocessor directives
  16.  
  17. #include "setcurs.ch"
  18. #include "grump.ch"
  19.  
  20. //───── end preprocessor directives
  21.  
  22. function blankscrn
  23. local mtop, mbott, buffer, mstart
  24. GFSaveEnv(.t., 0, 'w/n')
  25. cls
  26. ColorSet(C_MESSAGE)
  27. mbott := (mtop := int(maxrow() / 2) - 2) + 3
  28. SINGLEBOX(mtop, 25, mbott, 53)
  29. @ mtop + 1, 27 say 'The screen has been saved'
  30. @ mtop + 2, 27 say 'Push spacebar to continue'
  31. setcolor('w/n')
  32. buffer := savescreen(mtop, 25, mbott, 53)
  33. mstart = seconds()
  34. do while inkey() = 0
  35.    if seconds()-mstart > 10
  36.       scroll(mtop, 25, mbott, 53, 0)
  37.       mtop := if(mtop > maxrow() - 4, 0, mtop + 1)
  38.       mbott := if(mbott = maxrow(), 3, mbott + 1)
  39.       restscreen(mtop, 25, mbott, 53, buffer)
  40.       mstart := seconds()
  41.    endif
  42. enddo
  43. GFRestEnv()
  44. return NIL
  45.  
  46. * eof blank2.prg
  47.