home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / 2d / exam02.dba < prev    next >
Encoding:
Text File  |  2000-04-09  |  905 b   |  39 lines

  1. Rem * Title  : Draw A Box
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem ==========================================
  5. rem DARK BASIC EXAMPLE PROGRAM 2
  6. rem ==========================================
  7. rem This program will draw a box on screen
  8. rem ------------------------------------------
  9.  
  10. rem Set the ink to white and paper color to black 
  11. ink rgb(244,214,210),0
  12.  
  13. rem We will draw 100 box on screen
  14. for t=1 to 100
  15.     rem Get a random ink color
  16.     ink rgb(rnd(255),rnd(255),rnd(255)),1
  17.     
  18.     rem where on screen to draw box
  19.     left=rnd(640)
  20.     top=rnd(480)
  21.     right=(left+50)
  22.     bottom=(top+50)
  23.  
  24.     rem Draw the box
  25.     box left,top,right,bottom
  26. next t
  27.  
  28. rem Set the ink to white and paper color to black 
  29. ink rgb(244,214,210),1
  30.  
  31. rem Print a message on screen
  32. text 200,240,"press the spacebar to quit"
  33.  
  34. rem Will wait for you to press any key
  35. suspend for key
  36.  
  37. rem End the program
  38. end
  39.