Search Tools Links Login


Making Animated Gradien Label.
Changing the background of a label.

Original Author: cockrosoft corporation


'Add 1 labelbox and timer to your form


'Name the labelbox as Label1


'Name the timer as Timer1

'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 betwwen

'the 'Abs '(A-256))' and one of the zeros


'To decrease the pace of the animation,

'increase the timer interval property.

Label1.BackColor = RGB(Abs(A - 256),0,0)

End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 101 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.