VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Simple code to fade text in and out of 2 colours.

by Elliot Harris (3 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 10th August 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Simple code to fade text in and out of 2 colours.

API Declarations


•Place 2 timers. (default names)
•Place 2 Labels. (default names)
•Make form background colour black.

Rate Simple code to fade text in and out of 2 colours.



Private Sub Timer1_Timer()
B = B + 2
Label1.ForeColor = RGB(0, B / 2, B)
Label2.ForeColor = RGB(0, B, B / 2)
If B = 254 Then
    Timer2.Enabled = True
    Timer1.Enabled = False
End If
End Sub

Private Sub Timer2_Timer()
B = B - 2
Label1.ForeColor = RGB(0, B / 2, B)
Label2.ForeColor = RGB(0, B, B / 2)
If B = 0 Then
    Timer1.Enabled = True
    Timer2.Enabled = False
End If
End Sub


Download this snippet    Add to My Saved Code

Simple code to fade text in and out of 2 colours. Comments

No comments have been posted about Simple code to fade text in and out of 2 colours.. Why not be the first to post a comment about Simple code to fade text in and out of 2 colours..

Post your comment

Subject:
Message:
0/1000 characters