Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning an RGB color group using a Color Picker dialog
Message
From
15/01/2001 07:43:55
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00463695
Message ID:
00463716
Views:
11
Thanks Luis:)

>
>*------------------------------------------------
>* FUNCTION Col2RGB(tnColor)
>*------------------------------------------------
>* USE: Col2RGB(1547)
>* RETURN: Caracter -> "RGB(nR, nG, nB)"
>*------------------------------------------------
>FUNCTION Col2RGB(tnColor)
>  LOCAL lcRGB, ln
>  lcRGB = "RGB("
>  FOR ln = 1 TO 3
>    lcRGB = lcRGB+TRAN(tnColor%256,"999")+IIF(ln=3, "", ",")
>    tnColor = INT(tnColor/256)
>  ENDFOR
>  lcRGB = lcRGB+")"
>  RETURN lcRGB
>ENDFUNC
>*-------------------------------------------------
>
>
>>I want to be able to return an RGB color group by using some sort of color picker.
>>
>>GetColor() only returns the color number.
>>
>>Is it possible to convert the color number returned by GetColor to an RGB pair/group.
>>
>>Thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform