home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a079 / 1.img / FPDG.LZH / VOL2NUM0 / MISC / WINDEMO.PRG < prev    next >
Encoding:
Text File  |  1993-02-01  |  1.2 KB  |  50 lines

  1. *****************************************************************
  2. *     * 09/92               WINDEMO.PRG                         *
  3. *****************************************************************
  4. *     * Author's Name: Jeb Long                                 *
  5. *     *                                                         *
  6. *     * Description:                                            *
  7. *     * This program illustrates window manipulation operations *
  8. *****************************************************************
  9.  
  10.  
  11. DEFINE WINDOW x FROM 2,2 TO 15,40 COLOR w+/r,r/w
  12. DEFINE WINDOW y FROM 5,5 TO 10,70 COLOR w+/gr,rg+/w,w+/gr
  13. DEFINE WINDOW z from 10,10 to 19,74 COLOR g+/w,w/g,w/g 
  14. activate window x
  15. dir
  16. dir *.prg
  17. ACTIVATE SCREEN
  18. ACTIVATE WINDOW Y
  19. LIST STATUS
  20. ACTIVATE WINDOW Z
  21. LIST MEMO
  22. J = 1
  23. x='x'
  24. on error do fixwind
  25. declare coord[2,4]
  26. do setcoord
  27. do while .t.
  28. move window &x by coord[1,j],coord[2,j]   
  29. enddo
  30. proc fixwind
  31. j=(rand()*4+1)
  32. ? message()
  33. x=substr("XYZ",(3*rand()+1),1)
  34. if rand()>.5
  35.     activate window &x
  36. endif
  37. ? "This is a test of window",x, j
  38. return
  39.  
  40. proc setcoord
  41. coord[1,1] = 1
  42. coord[1,2] = -1
  43. coord[1,3] = 1
  44. coord[1,4] = -1
  45. coord[2,1] = 1
  46. coord[2,2] = 1
  47. coord[2,3] = -1
  48. coord[2,4] = -1
  49. return
  50.