How to make an Animated Gradient label
Posted on January 5, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 'Controls - How to make an Animated Gradient label Option Explicit 'Add a Label and a Timer to your Form. Set the Timer Interval property to 1. 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 |