Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Colors
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Re: Colors
Miscellaneous
Thread ID:
00520267
Message ID:
00520271
Views:
20
This message has been marked as the solution to the initial question of the thread.
Bob,

>I have found a color palette, on the web, so I know hex color value of the color like CCFF33 however, what I would like to do is use that color palette on forms in VFP.
>
>Does anyone know of way to conver web hex colors to RGB colors as used in VFP so the colors come out the VFP uses hem like 1280052125


HTML colors are specified as RGB with two hex digits per color. You can convert them to VFP colors with:

lcWebColor = "CCFF33"
_screen.BackColor = rgb( eval("0x" + substr(lcWebColor,1,2)), eval("0x" + substr(lcWebColor,3,2)), eval("0x" + substr(lcWebColor,5,2)) )

>is it a smple as converting the hex to a value ?

Nope, try this:

_screen.backcolor = 0xCCFF33

>Secondly ..
>Reading up on the set colorscheme to command, I cant see a way to use that command with forms ? am I wrong ?

Look at the ColorSource property of the form.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform