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.
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