by photon (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating:
(2 Votes)
These codes fade a Label ForeColor from Black to Red, Blue, or Green. They were written to be used on a Splash Screen. I used them on my Splash Screen and it works pretty good I like it...
Inputs
Place this code in the "Declarations" section...
There must be a Timer with an Interval of 1...
If you aren't sure how to Fade these colors, I will explain how to... Type FadeRed Label1, FadeBlue Label1, or FadeGreen Label1, in the Timer1_Timer event...
Side Effects
If the FadeRed Label1, FadeBlue Label1, or FadeGreen Label1 is not placed in the Timer1_Timer event, the Form won't Load properly and propably not Load at all, so place it in the Timer1_Timer...
Private Sub FadeRed(Label As Label)
Static FadeColor As Integer
FadeColor = FadeColor + 1
Label.ForeColor = RGB (FadeColor*2.5, 0, 0)
End Sub
Private Sub FadeBlue(Label As Label)
Static FadeColor As Integer
FadeColor = FadeColor + 1
Label.ForeColor = RGB (0, 0, FadeColor*2.5)
End Sub
Private Sub FadeGreen(Label As Label)
Static FadeColor As Integer
FadeColor = FadeColor + 1
Label.ForeColor = RGB (0, FadeColor*2.5, 0)
End Sub