home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / Basic / QWINDO.ZIP / WBOX.BAS < prev    next >
Encoding:
BASIC Source File  |  1990-01-01  |  1.2 KB  |  43 lines

  1. '****************************************************************************
  2. ' WBOX.BAS - Fancy Demo using WBOX function.
  3. '****************************************************************************
  4. REM $DYNAMIC
  5. DEFINT A-Z              'Make all variables integers by default.
  6. CALL QWINIT(4)          'Need to call this command before using any QW commands.
  7.  
  8. DIM SHARED w(2000)      'Dimension an integer array for our window.
  9. DIM SHARED c(10)        'Dim an integer array for our random values.
  10. CLS                     'Clear the screen.
  11.  
  12. '---- First lets open a window ----
  13. id = 1                  'Setup id for the window.
  14. CALL WOPEN(3, 3, 78, 24, 2, &H4, "FUN BOX", w(), id)
  15.  
  16. ' Initialize an integer array with some random numbers
  17. FOR i = 1 TO 8
  18.    c(i) = INT(RND(10) * 7) + 1
  19. NEXT i
  20.  
  21. CALL WCOLOR(id, &HF)
  22. FOR k = 1 TO 200
  23.   CALL WLOCATE(id, 35, 9)
  24.   CALL WPRINT(id, STR$(k))
  25.   FOR i = 4 TO 32 STEP 4
  26.     j = INT(i / 4) + 1
  27.     CALL WBOX(id, 37 - i, 9 - j, 37 + i, 9 + j, c(j - 1), 5)
  28.   NEXT i
  29.   FOR j = 8 TO 1 STEP -1
  30.      c(j) = c(j - 1)
  31.   NEXT j
  32.   c(1) = INT(RND(10) * 7) + 1
  33. NEXT k
  34.  
  35. PRINT "Press ENTER:";
  36. INPUT a$
  37. CALL WCLOSE(id)
  38.  
  39.  
  40.  
  41.  
  42.  
  43.