home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #3.1 / RBBSIABOX31.cdr / qpay / qbattr.doc next >
Text File  |  1986-09-27  |  4KB  |  101 lines

  1.  
  2.                QuickBASIC 2.00 DISPLAY ATTRIBUTES
  3.                ----------------------------------
  4.                                by
  5.                          Ian M. Beguesse
  6.                             Tampa, FL
  7.  
  8.  
  9. Microsoft QuickBASIC Version 2.00 allows you to change the default
  10. foreground and background colors of the text, but nothing else.  The
  11. information in this file shows you how to use DEBUG to change the color
  12. attributes of any or all aspects of the QB display screen.
  13.  
  14. Use the following procedure:
  15.  
  16. C>REN QB.EXE QB         ; Rename a copy of QB.EXE
  17.  
  18. C>DEBUG QB              ; Invoke the debugger
  19.  
  20. -R                      ; The registers are displayed.
  21.                         ; Note the DS register, say 'xxxx'
  22.  
  23. -H 2666 xxxx            ; This displays two hex numbers
  24.                         ; Note the first, say 'yyyy'
  25.  
  26. -RDS                    ; This allows you to change the DS register
  27. DS zzzz                 ; 'DS zzzz' is displayed
  28. :yyyy                   ; type 'yyyy', the first of the 2 hex numbers
  29.  
  30. -D 1A LC                ; This displays the color attribute bytes
  31.  
  32. -D 26 LC                ; This displays the monochrome attribute bytes
  33.  
  34.  
  35. The following table shows the locations, original contents and what
  36. they are used for.
  37.  
  38. ===== COLOR =====   ===== MONO ======
  39. -----------------------------------------------------------------
  40. LOCATION DEFAULT   LOCATION DEFAULT   USED FOR
  41. -----------------------------------------------------------------
  42.    1A      02         26      07      Border
  43.    1B      1C         27      07      Text
  44.    1C      74         28      07      Windows - border & headings
  45.    1D      74         29      07      Help border & CANCEL box
  46.    1E      71         2A      07      Windows - text
  47.    1F      30         2B      70      Menu - title bar
  48.    20      03         2C      07      Menu - selected title
  49.    21      02         2D      07      Menu - box outline
  50.    22      0F         2E      0F      Menu - bright text
  51.    23      07         2F      07      Menu - dim text
  52.    24      70         30      70      Menu - selected item
  53.    25      20         31      70      Scroll Bars
  54.  
  55.  
  56. How to "read" attributes:
  57.  
  58. An attribute byte has two parts.  The background is given by the first
  59. hex character and the foreground by the second.  For example if the
  60. attribute is 74, 7 represents the background, and 4 represents the
  61. foreground color.  All the possible colors are these:
  62.  
  63. BACKGROUND or FOREGROUND:
  64.  
  65.               0      Black
  66.               1      Blue
  67.               2      Green
  68.               3      Cyan
  69.               4      Red
  70.               5      Magenta
  71.               6      Brown
  72.               7      White
  73.  
  74. FOREGROUND ONLY:
  75.  
  76.               8      Gray
  77.               9      Light Blue
  78.               A      Light Green
  79.               B      Light Cyan
  80.               C      Light Red
  81.               D      Light Magenta
  82.               E      Yellow
  83.               F      Bright White
  84.  
  85. To change an attribute, select the desired foreground and background.
  86. For example, bright white on red would be 4F.  Then make the change as
  87. follows.
  88.  
  89. -E aa bb                ; Where 'aa' is the location
  90.                         ; and 'bb' is the desired attribute.
  91.  
  92. When you are finished, type
  93.  
  94. -W                      ; This saves the changes
  95.  
  96. -Q                      ; Takes you back to DOS
  97.  
  98. C>REN QB QB.EXE         ; Restore original name.
  99.  
  100. Now execute 'QB' to see your changes in effect.
  101.