Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RGB ?? GETCOLOR() ??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00470637
Message ID:
00470769
Vues:
41
>Does anyone know how to get the numeric equivilent to the RGB()results.I have a table that I am storing the returmed value From the getcolor(). However when I use it the activex control iam useing needs it in the RGB() format
*------------------------------------------------
* FUNCTION Col2RGB(tnColor)
* USE: Col2RGB(GETCOLOR())
*------------------------------------------------
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
*-------------------------------------------------
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform