27-05-16, 06:35 PM
PHP كود :
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Dim colors As List(Of Color) = New List(Of Color) From {Color.Blue, Color.Red, Color.Black, Color.Orange}
Dim current As Integer = DateTime.Now.Minute
Dim period As Integer = current
Dim index = period Mod colors.Count
Me.BackColor = colors(index)
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Enabled = True
Timer1.Start()
End Sub

