Alfredo Awesome Monazite Alfredo Awesome Monazite - 1 year ago 51 Question

display a message to a label in at specified times during the day

I would like to display a sentence in a text box at a 5 specific times during the day automatically. for example:
at 5:30 AM,

Textbox1.text = "breakfast"

at 7:30 AM

textbox1.text = "leave for school",

a timer can just start when the application is launched, although it needs to refer to the local time or some constant time as the program needs to output at the same time each day of the week without me having to change it manually.


You can still do this with a Timer and you wouldn't have to do any math...

Every time the Timer raises a Tick event, you check the value of: System.DateTime.Today.Now.ToString("HH:mm"). If it is equal to your preset time, change the text in the TextBox