Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code to create a contrasting color
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01486509
Message ID:
01486569
Views:
54
I am not sure if this is what you can use , but I allow the user to set a form to any color. So in the form GotFocus, I check that he hasn't made it ugly, like black letters on black background or vice-versa,
I picked a form backcolor value that is approximately in the middle of 0 to the largest it can get.
* set the font color based on how light or dark the form backcolor is
IF thisform.BackColor > 13882192
	thisform.label1.ForeColor = 0
... and so on
HTH
Ron Seidl
Independent Developer
VFP

"I'm playing in life's theater in anticipation of a great cast party!"
Previous
Reply
Map
View

Click here to load this message in the networking platform