Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting colors
Message
 
To
01/04/1999 10:34:24
Ian Johnston
Computer Software Solutions
Woodland, California, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00204232
Message ID:
00204265
Views:
15
>>>What is the easiest way to present the user with a color selection palette and allow them to select their own colors ?
>>
>>nColor=getcolor()
>>if nColor<0
>> return
>>endif
>>Thisform.Backcolor=nColor
>
>Is there a way to convert the number returned by this for use in the RGB function? I have existing classes that I used rgb() to set the colors.

Hi Ian,

In addition to Ed's suggestion, if you use the Foxtools library, it has a function called RGBComp(). It works like this:
* lncolor is the color to convert
STORE 0 TO lnred, lngreen, lnblue
= RGBComp(lncolor, @lnred, @lngreen, @lnblue)
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform