home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / DATABASE / UDCOLORS.ZIP / UDCOLORS.TXT < prev    next >
Encoding:
Text File  |  1990-02-22  |  3.2 KB  |  89 lines

  1.  
  2.    Ever wish you could let each and every user of your xBASE applications
  3. pick their own colors and change them as often as they want?
  4.  
  5.    You can and they can!  Use UDCOLORS.ZIP!
  6.  
  7. UDCOLORS.ZIP contains the following files:
  8.  
  9. UDCOLORS.TXT ..... this file
  10. UDCOLORS.EXE ..... file containing the compiled program
  11. UDCOLORS.DBF ..... a DBF to store user's color selections
  12. UDCOLORS.NDX ..... the index
  13. UDCSETUP.DBF ..... a DBF for running UDCOLORS.EXE
  14.   CUROFF.BIN
  15.    CURON.BIN
  16. ...........................................................................
  17.  
  18.    UDCOLORS.EXE was written to permit end users to select their color
  19. preference for YOUR applications. It is also useful if you encounter
  20. hardware that won't respond to normal color settings.
  21.  
  22.    In YOUR application, keep a copy of UDCOLORS.DBF and UDCOLORS.NDX.
  23. (Index on NAME for indexes other than NDX).  The first field contains the
  24. user's name. Every other field represents the color code for each memvar
  25. that you macro substitute for each window or box. Each record is for a
  26. different user.
  27.  
  28.    When a user signs on, the system loads whatever colors they have
  29. previously selected and saved. Users can change their colors any time they
  30. wish. This method prevents complaints about color selection. It is just as
  31. easy to append records for different machines by assigning the machine's name
  32. instead of a user name.
  33.  
  34. ........................................................................
  35.  
  36. *
  37. *             Sample coding using UDCOLORS in your application
  38. *
  39.  
  40. SET TALK OFF
  41.  
  42. mname=SPACE(25)
  43.  
  44. DO WHILE mname = SPACE(25)      &&... Force the user to sign onto sysytem
  45.    @ 16,40 GET mname PICT [@!]
  46.    READ
  47. ENDDO
  48.  
  49. SELECT 1
  50. USE udcolors INDEX udcolors     &&... The DBF that contains previously
  51.                                 **.. defined colors
  52.  
  53. IF ISCOLOR()     &&... Test for a color system
  54.    SEEK mname
  55. ELSE
  56.    SEEK "DEFAULT MONO"  &&.. If not color, use mono colors
  57. ENDIF
  58.  
  59. IF FOUND()  &&...................... use user's colors
  60.    STORE MAIN1 TO MAIN1 &&....Create additional memvars from fields for Menus,
  61.    STORE MAIN2 TO MAIN2 &&..Warning, Help, Message and Special windows and boxes
  62.    STORE MAIN3 TO MAIN3 &&....If you're using dBXL/Quicksilver, you can
  63.                         **..simply code STORE AUTOMEM
  64. ELSE        &&...................... use default colors
  65.    GO 1 
  66.    STORE MAIN1 TO MAIN1 &&....Create additional memvars from fields for Menus,
  67.    STORE MAIN2 TO MAIN2 &&..Warning, Help, Message and Special windows and boxes
  68.    STORE MAIN3 TO MAIN3 &&....If you're using dBXL/Quicksilver, you can
  69.                         **..simply code STORE AUTOMEM
  70. ENDIF
  71. SET COLOR TO &main1,&main2,&main3   &&....... macro substitute memvars
  72.  
  73. *
  74. *  Copy SET COLOR TO for other windows and boxes in your application
  75. *
  76.  
  77. ...........................................................................
  78.  
  79. If you like this routine, and want the source code, send $15.00 to cover
  80. shipping & handling to:
  81.  
  82.                Herb Niewender
  83.                RD 1 Box 464C
  84.                Pleasantville, NJ  08232  (609)645-1900 Voice
  85.  
  86.                             ACADEMIA BBS (609)652-4914  1200/2400
  87.                                          (609)652-4923  9600 HST
  88.  
  89.