mardi 30 décembre 2014

can I convert a label that shows the time into a background color?


I have a label that displays the time and I would like to convert that label.text into a color for the background that changes every time the time changes. Is this possible? My code is below. Example: If the time displayed is 11:23:04 I would like the background color to be changed to #112304. If the time displayed is 11:24:00 I would like the background color to be changed to #112400. etc. etc. Private Sub Timer1_Tick() Handles Timer1.Tick


Label1.Text = TimeOfDay


Label2.Text = System.DateTime.Now.ToString("MM/d/yyy")


End Sub


End Class





Aucun commentaire:

Enregistrer un commentaire