Hi,
I wonder if you have any tips on this subject;
My app will be running in the background and perform tasks on certain times and also react differently on certain events depending on the time and date.
For example, if a certain button can maximum be allowed to be pushed 15 times a day, how would I do And say after being pushed three times, it cannot be pushed for the next 30 minutes and then I could push it three times again before it gets disabled for a while. Thankful for tips.

24 hr time handling
87jerome
Rgranada
Deepa7476
indeed, you would need the Timer class firstly to run the processes needed to be ran throughout the timeframe of the application being ran.
Secondly you probably want to store the DateTime of the button being pushed on the button click event. So if they press the button, they would check the last time the button was pressed, compare the current time and see if it has been 30 minutes or more before they can execute the function of the button.
you could also have a global variable, something like "NumberOfTimesPushedToday", and increment 1 to it on the push of the button. now, when the button is pushed, check to see how many times its been pushed, if its more than the specified number of times then don't execute whatever function if it you want.
The variable would be reset if the current DateTime is a new day/ 00:00:00 time.