Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RGB Color Table
Message
 
To
04/05/2011 04:53:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01509372
Message ID:
01509397
Views:
87
This message has been marked as the solution to the initial question of the thread.
>Hi All,
>
>Is there a formula / function that, given a particular row and col coordinate, I can use to return the RGB color values as they are displayed in the color picker in VFP going from left to right and then top to bottom?
CLEAR
lnStep = 51
_SCREEN.DRAWSTYLE = 0
_SCREEN.FILLSTYLE = 0
lnX = 0
lnY = 0
FOR lnR = 0 TO 255 STEP lnStep
  lnX = lnX + 16
  lnY = 0
  FOR lnG = 0 TO 255 STEP lnStep
    FOR lnB = 0 TO 255 STEP lnStep
      lnY = lnY + 16
      _SCREEN.FILLCOLOR = RGB(lnR,lnG,lnB)
      _SCREEN.BOX(lnX,lnY,lnX+16,lnY+16)
    ENDFOR
  ENDFOR
ENDFOR
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform