Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dumb Question # 4 Color Schemes

Status
Not open for further replies.

FAC17

Programmer
Jan 24, 2002
26
0
0
US
I want to develope a color scheme for a project. I looked up the information on creating color schemes but I can't find anything that tells me how to corrolate the color pairs to what is to be displayed. Can you tell me where to look?

Thanks SOOOOO much!

FAC
 
A lot of the colors for any Windows application come from the user's Control Panel. The only things you can really change are BackColor and ForeColor properties for individual controls. These are done using RGB() pairs specifying the amount of Red, Green, and Blue (0-255 each).

Exactly what are you trying to do?

Ian
 
Ian,

If one uses the scheme(n) or rgbscheme(n). The color pairs for color scheme n are are returned. I read that, with the exception of a couple reserved color scheme numbers, I can set up my own color sets which consist of 10 pairs of colors.

From my experience with earlier versions of Foxplus/pro these color pairs represent different displays on the screen ie - foreground, background, highlighted foreground/background, disabled forground/background etc. From my reading, I thought I could develope a standardized color scheme for a project so that I didn't have to set all the colors for each control.

Assuming that this is correct, I need to know, positionally, what display each color pair affects.

Right? Wrong? Totally in a separate dimension?

Thanks!

FAC
 
If you are working in VFP, the "standard" way to go is to subclass the VFP base classes.

I created a class library called "baseclasses" and created a control of each type that I use in my project. I then added this class library to my Form Controls toolbar (Tools/Options, Controls tab, select Visual Class Libraries and click Add...).

If you create all of your forms and controls from your classes instead of the VFP Base Classes, then any changes (color, for example) that you make to your class will automatically happen everywhere in your project. This is known in OOP as "Inheritance". I highly recommend this approach, and must give credit to Ramani for posting it oh so long ago. :eek:)

Does that help?

Ian
 
Ian,

Yes it does help thanks!

I can/will develope the controls with the cosmetics that I like but does no one use this color scheme thing? Seems odd not to be able to find out how to use it. Just that it exists.

Thanks so much!

FAC
 
I have no idea...I always assumed the ColorScheme commands were remnants from the old FoxPro for DOS days. I tried reading up on them when I came across them in the MSDN, but they were too confusing and I gave up. LOL

Ian
 
Ian,

Oh well - another mystery will remain so.

Thanks for your help!

FAC
 
Color schemes are definately a left over from the dos days, and the manual used to specifically say not to use them except as a backward compatability thing. Frankly even in the dos days they were a huge pain.

It is considered very poor windows style to override the users windows color settings.

BTW one thing I do to check that I have not accidently set a control permanently to the default silver color is to alway have my windows colors set to something other than the default. It makes those objects stick out like sore thumbs. I can't even begin to count how many programs I have seen with a couple of labels or a text field 'stuck' to the wrong color.

 
Good Point! I'll remember that!

FAC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top