Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning an RGB color group using a Color Picker dialog
Message
De
15/01/2001 07:43:55
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00463695
Message ID:
00463716
Vues:
12
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform