If the problem you are trying to solve is that you can only respond to such events when your program is running, this is true. The most practical solution to this problem is to run the program in the background, most often using the notification icon on the taskbar.
If the problem is that you do not know how to track such events, you can either use the existing infrastructure (see graphic answer), set timers (research System.Threading.Timer), or periodically compare DateTime.Now with various DateTime objects . In the latter case, you will need to serialize DateTime objects to save them to disk between sessions.
source share