Public Class Form1

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim i, j, n As Integer
        Dim cn(2) As Integer
        Randomize()
        For i = 1 To 4
            For j = 0 To 2
                cn(j) = Int(Rnd() * 256)
            Next
            n = Int(Rnd() * 10)
            Select Case i
                Case 1
                    Label1.Text = n
                    Label1.ForeColor = System.Drawing.Color.FromArgb(cn(0), cn(1), cn(2))
                Case 2
                    Label2.Text = n
                    Label2.ForeColor = System.Drawing.Color.FromArgb(cn(0), cn(1), cn(2))
                Case 3
                    Label3.Text = n
                    Label3.ForeColor = System.Drawing.Color.FromArgb(cn(0), cn(1), cn(2))
                Case 4
                    Label4.Text = n
                    Label4.ForeColor = System.Drawing.Color.FromArgb(cn(0), cn(1), cn(2))
            End Select
        Next
    End Sub
End Class
