How to make a label flash different colours in VB 2008.
Coded by K ii 3 R Zz.
Insert 2 Timers and 1 label. change timer1's interval to 50 and set it as enabled
and timer2's interval to 100 and set it as enabled
Make the labels Forecolor to Black <----- Very Important!
Now Double Click Timer1 And Type In This Code:
If Label1.ForeColor = Color.Black ThenLabel1.ForeColor = Color.BlueElseIf Label1.ForeColor = Color.Blue ThenLabel1.ForeColor = Color.RedElseIf Label1.ForeColor = Color.Red ThenLabel1.ForeColor = Color.GreenElseIf Label1.ForeColor = Color.Green ThenLabel1.ForeColor = Color.YellowElseIf Label1.ForeColor = Color.Yellow ThenLabel1.ForeColor = Color.BlackEnd If
Now Double Click Timer2 And Type In This Code:
if Label1.Visible = True ThenLabel1.Visible = FalseElseIf Label1.Visible = False ThenLabel1.Visible = TrueEnd If
Hope You Enjoy!