Make An Animated Gradient Label

'Add 1 Label and 1 Timer To Your Form. Set the Timer Interval property to 1.
'Insert the following code to your form:

Private Sub Timer1_Timer()
Static A
A = A + 10: If A > 510 Then A = 0
'To change the effect, put other numbers insted of the 0 below.
'You can also replace places between the 'Abs(A - 256)' and one of the zeros below.

'To decrease the pace of the animation, increase the Timer interval property.
Label1.BackColor = RGB(Abs(A - 256), 0, 0)
End Sub

Go Back