home *** CD-ROM | disk | FTP | other *** search
- Rem * Title : Draw A Box
- Rem * Author : DBS-MB
- Rem * Date : 1st August 99
- rem ==========================================
- rem DARK BASIC EXAMPLE PROGRAM 2
- rem ==========================================
- rem This program will draw a box on screen
- rem ------------------------------------------
-
- rem Set the ink to white and paper color to black
- ink rgb(244,214,210),0
-
- rem We will draw 100 box on screen
- for t=1 to 100
- rem Get a random ink color
- ink rgb(rnd(255),rnd(255),rnd(255)),1
-
- rem where on screen to draw box
- left=rnd(640)
- top=rnd(480)
- right=(left+50)
- bottom=(top+50)
-
- rem Draw the box
- box left,top,right,bottom
- next t
-
- rem Set the ink to white and paper color to black
- ink rgb(244,214,210),1
-
- rem Print a message on screen
- text 200,240,"press the spacebar to quit"
-
- rem Will wait for you to press any key
- suspend for key
-
- rem End the program
- end
-