Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RGB ?? GETCOLOR() ??
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00470637
Message ID:
00470769
Views:
43
>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
________________________________
Previous
Reply
Map
View

Click here to load this message in the networking platform