home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / system / exam03.dba < prev    next >
Encoding:
Text File  |  2000-04-09  |  1.6 KB  |  75 lines

  1. Rem * Title  : Switch Graphic Cards
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem ==========================================
  5. rem DARK BASIC EXAMPLE PROGRAM 3
  6. rem ==========================================
  7. rem This program will switch graphics cards
  8. rem ------------------------------------------
  9.  
  10. rem Set the ink to white and paper color to black 
  11. ink rgb(244,214,210),1
  12.     
  13. rem Ask computer what graphics card are in the computer
  14. perform checklist for graphics cards
  15.  
  16. for t=1 to checklist quantity()
  17.     rem print the name of any graphics card we have found
  18.     print t," ",checklist string$(t)
  19. next t
  20. print
  21.  
  22. rem What graphic card is Dark Basic using 
  23. print "using ";current graphics card$()
  24. print
  25.  
  26. rem Wait for any key
  27. print "Press Any Key"
  28. suspend for key
  29.  
  30. rem Set to use the primary display drivers
  31. set graphics card checklist string$(1)
  32.  
  33. repeat
  34.  
  35.     rem Prompt
  36.     set cursor 0,0
  37.     print "SELECT PRIMARY DISPLAY DRIVER"
  38.     print "LEFT MOUSE BUTTON"
  39.  
  40.     rem Pick a random pen color
  41.     ink rgb(rnd(255),rnd(255),rnd(255)),1
  42.  
  43.     rem Draw a random circle on screen
  44.     circle rnd(640),rnd(480),rnd(90)+10
  45.  
  46. until mouseclick()=1
  47.  
  48. rem Clear screen
  49. cls
  50.  
  51. if checklist quantity()>1
  52.  
  53.     rem Set dark basic to use secondary display drivers
  54.     set graphics card checklist string$(2)
  55.  
  56.     repeat
  57.  
  58.         rem Prompt
  59.         set cursor 0,0
  60.         print "SELECT PRIMARY DISPLAY DRIVER"
  61.         print "LEFT MOUSE BUTTON"
  62.  
  63.         rem Pick a random pen color
  64.         ink rgb(rnd(255),rnd(255),rnd(255)),1
  65.  
  66.         rem Draw a random circle on screen
  67.         circle rnd(640),rnd(480),rnd(90)+10
  68.  
  69.     until mouseclick()=1
  70.  
  71. endif
  72.  
  73. rem End the program
  74. end
  75.