Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Colors
Message
From
16/06/2001 16:15:15
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Re: Colors
Miscellaneous
Thread ID:
00520267
Message ID:
00520298
Views:
17
This message has been marked as a message which has helped to the initial question of the thread.
even shorter:
lcWebColor = "CCFF33"
_screen.backcolor = evaluate("0x" + substr(lcWebColor,5,2) + ;
    substr(lcWebColor,3,2) + ;
    substr(lcWebColor,1,2))
Note that VFP colors are numeric and can be thought of as 4 byte integer such that 0BGR. Therefore, you can do it by hand as: _screen.backcolor = 0x33FFCC

>Thanks This was it exactally. Just what I needed. !
>Bob Lee
>
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform