VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Fade Label Caption to Red

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

Rate Fade Label Caption to Red

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

Download this snippet    Add to My Saved Code

Fade Label Caption to Red Comments

No comments have been posted about Fade Label Caption to Red. Why not be the first to post a comment about Fade Label Caption to Red.

Post your comment

Subject:
Message:
0/1000 characters