I have already some code which change the control's forecolor randomly in the timer event object which i create an array of colors
VB Code:
Private Sub tmrClock_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrClock.Tick Dim MyColor(5) As Color MyColor(1) = Color.Azure MyColor(2) = Color.Bisque MyColor(3) = Color.Blue MyColor(4) = Color.DarkKhaki MyColor(5) = Color.AliceBlue Me.lbl1.ForeColor = MyColor(CInt(Int((5 * Rnd()) + 1))) End Sub
Are there more better idea? I dont the array style here. Thanks.




Reply With Quote