i have:
this is supposed to make the text flash different colors. I'm trying to get a certain variable ex: tc6 by taking the current number and putting tc before it. This obviously doesn't work. How can i fix this?Code:Public Class Form1 Public tc1 = Color.Blue Public tc2 = Color.Green Public tc3 = Color.Orange Public tc4 = Color.Yellow Public tc5 = Color.Pink Public tc6 = Color.Red Public cSelNum As Integer Private Sub tcTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tcTimer.Tick Dim cSel If cSelNum = 6 Then cSelNum = 1 Else cSelNum += 1 End If cSel = "tc" & cSelNum.ToString Label1.ForeColor = cSel End Sub End Class




Reply With Quote