The QBasic / QB64 Discussion Forum      Other Subforums, Links and Downloads
 
Respond to this messageReturn to Index
Original Message
  • changing the colors
    • mennonite (no login)
      Posted May 17, 2005 3:57 PM


      'that is a nice program... ha, you ripped the music off nibbles :D

      'michael's idea is good, here's a way to change colors... i like blue better than green,
      'but i think light blue (color 9) is easier to see than blue (color 1) so here's an exapansion of this code:

      INPUT "Would you like blue leters (press 1) or green letters (2)"; x
      IF x = 1 THEN Y = 1
      IF x = 2 THEN Y = 2

      'to this:

      PRINT "press a letter for the following color:"
      PRINT "would you like to see:"
      PRINT
      COLOR 1: PRINT "a. blue"
      COLOR 2: PRINT "b. green"
      COLOR 3: PRINT "c. cyan"
      COLOR 4: PRINT "d. red"
      COLOR 5: PRINT "e. magenta"
      COLOR 6: PRINT "f. brown"
      COLOR 7: PRINT "g. white"
      COLOR 8: PRINT "h. grey"
      COLOR 9: PRINT "i. light blue"
      COLOR 10: PRINT "j. light green"
      COLOR 11: PRINT "k. light cyan"
      COLOR 12: PRINT "l. light red"
      COLOR 13: PRINT "m. light magenta"
      COLOR 14: PRINT "n. yellow"
      COLOR 15: PRINT "o. bright white"
      DO
      sele$ = LCASE$(INPUT$(1))
      LOOP UNTIL INSTR("abcdefghijklmno", sele$) > 0 ' keep going if answer not ok
      y = INSTR("abcdefghijklmno", sele$) 'set y to new color (you'll still want to use COLOR y, 0 later)
    Login Status
  • You are not logged in
    • Login
      Password
       

      Optional
      Provides additional benefits such as notifications, signatures, and user authentication.


      Create Account
    Your Name
    Your Email
    (Optional)
    Message Title
    Message Text
    Options Also send responses to my email address
          


    Newbies usually go to www.qbasic.com and click on The QBasic Forum
    Forum regulars have their own ways, which include The QBasic Community Forums