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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing colours - Why 1

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
GB

Hi

I'm having a problem with forms and in particular the colour it shows at different times.

The colour for all objects on the form should be set to:

BackColor 212,208,200
ColorSource 4 - Windows Control Panel (3D Colors)

This works ok but when transfered to another computer some (not all) the colours change to:

BackColor 236,233,216
ColorSource 0 - Objects Color Properties

What is the best way to ensure that wherever the finished app is used, the BackColor will remain at 212,208,200 ?

Thank you

Lee
 

Hi Mike

Would that be at the start of the main prg?

Lee
 
Lee,

Yes. Put the code at the start of the program, and it will apply throughout the app.

Be aware that turning off themes will change the appearance of the application in several subtle ways. Importantly, it will also override any theme choices the user makes in Control Panel, which some programmers consider bad practice.

On the other hand, it does give you back control over your colours. Personally, I always turn themes off, but others might feel differently.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 

Thank you Mike, great advice as always.

Kind regards

Lee
 
PMFJI, but you should not set any colors in your applications, but rather keep color settings at default values. You application will then use the colors set by the user in Windows Display Settings. Many people are color and/or shade blind and adjust their Windows settings so they can read the screen. If you set specific colors, the user may not be able to read your screen.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 

Craig

Appreciate your point but in this case scenario we have users who all have different colour schemes set (for cosmetic purposes, notcolour blindness etc) and I am not involved in Group Policy decisions.

The client has specifically asked that everyone who uses the app on the server has consistency which includes the layout and colour scheme.

Lee

Mike: Do you have any views on Craig's point?
 
Lee,

Do you have any views on Craig's point?

I agree with Craig's general point about respecting the user's choices in the display settings. I've often argued along the same lines in this forum.

However, like you, I occasionally have a need to customise the colour scheme in my application, usually to provide a visual clue as to the status of an object. I also find that certain themes might look fine when viewing Word documents or Excel spreadsheets, but don't lend themselves to data-entry forms. For those reasons, I prefer to set themes off.

Of course we need to be aware of users who are colour /shade blind. I make a point of never relying on colour alone to provide information.

I'd be interested in hearing other people's views.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 

Thank you for the post Mike.

As far as this app goes, consistency is the key word and yes, there are certain fields with certian colour codings that must be visible when records are being created, updated and finalised. One example here is when a record is overdue the row in a grid is red.

Now I know what Craig is going say, "What if the person is colour blind?". In this particular environment no one is but I do take the point and advice for any future projects.

Thank you all

Lee
 
Lee,

One other thing to keep in mind. Some countries have laws regarding colors of computer screens. For example, in the US, the Americans with Disabilities Act may apply. My experience is that many business owners have no idea they could be violating the law by forcing colors on their custom software.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 

Another good point Craig.

If I ever expand my work in to the good old US of A, I will remember that advice.

Kind regards

Lee
 
Craig,

Some countries have laws regarding colors of computer screens.

I don't think any country has a law that mandates particular colours for the screen.

The ADA, and its equivalents elsewhere, require that the needs of disabled users (including those who are colour-blind) be taken into account. It does not prevent the programmer from choosing any colours he likes, including overriding the user's choice of colours, provided that in doing so he does not prevent the user from using the software.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike,

I think you're missing the point. If you leave all of VFPs color settings at default, then your app will pickup what the user has selected in Windows Display Settings. If you override those colors, you may cause color blind and other sight impared users from seeing the screens in your application, which could violate the law. If one person can't see your screens, you are in violation. That's a chance I'd rather not take.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top