Search Tools Links Login

AnimatedGradientLabel


Visual Basic 6, or VB Classic

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

Original Author: cockrosoft corporation

Code

'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

'below.

'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: 109 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.