Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning an RGB color group using a Color Picker dialog
Message
 
À
15/01/2001 05:43:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00463695
Message ID:
00463712
Vues:
15
*------------------------------------------------
* 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
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform