PROCEDURE Timer.Init() * Assuming you start out with orange RGB(255,192,128) and want to end up with yellow RGB(255,255,0) in 50 steps: thisForm.color_red = 255 thisForm.color_grn = 192 thisForm.color_blu = 128 thisForm.step_red = (255 - 255) / 50 thisForm.step_grn = (192 - 255) / 50 thisForm.step_blu = (128 - 0) / 50 thisForm.counter = 50 thisForm.incrementing = .f.Then on your timer event:
PROCEDURE Timer.Timer() thisForm.color_red = thisForm.color_red + (IIF(thisForm.incrementing, -1, 1) * thisForm.step_red) thisForm.color_grn = thisForm.color_grn + (IIF(thisForm.incrementing, -1, 1) * thisForm.step_grn) thisForm.color_blu = thisForm.color_blu + (IIF(thisForm.incrementing, -1, 1) * thisForm.step_blu) thisForm.lblWhatever.ForeColor = RGB(thisForm.color_red, thisForm.color_grn, thisForm.color_blu) thisForm.counter = thisForm.counter - 1 IF thisForm.counter = 0 * Time to trigger the reversal, or to start back over, your choice * If starting back over: this.init() * If going back to the original starting color thisForm.counter = 50 thisForm.incrementing = !thisForm.incrementing ENDIFHope this helps!