stingrae Active Member Licensed User Longtime User Sep 12, 2018 #1 Hi, If I have a timer which set to 30 seconds (for example) ... which refreshes the screen. What happens is that the user is in the middle of doing something and the timer will trigger and the screen refreshes. What we want to do is put code on each button so that the timer is set back to be 30 seconds of in-activity before being refreshed. Is there a way to reset the Time back to 30 seconds? I've tried the code below on a button, but it has no effect ... the timer keeps firing every 30 seconds. Does that make sense? If so, thanks in advance. Code: Copy tmrBusiness.Enabled = False tmrBusiness.Interval = 30000 tmrBusiness.Enabled = True
Hi, If I have a timer which set to 30 seconds (for example) ... which refreshes the screen. What happens is that the user is in the middle of doing something and the timer will trigger and the screen refreshes. What we want to do is put code on each button so that the timer is set back to be 30 seconds of in-activity before being refreshed. Is there a way to reset the Time back to 30 seconds? I've tried the code below on a button, but it has no effect ... the timer keeps firing every 30 seconds. Does that make sense? If so, thanks in advance. Code: Copy tmrBusiness.Enabled = False tmrBusiness.Interval = 30000 tmrBusiness.Enabled = True
Erel B4X founder Staff member Licensed User Longtime User Sep 12, 2018 #2 Your code should work. Are you sure that it doesn't? stingrae said: What we want to do is put code on each button so that the timer is set back to be 30 seconds of in-activity before being refreshed. Click to expand... Don't duplicate the code. Call a single sub from all buttons. Upvote 0
Your code should work. Are you sure that it doesn't? stingrae said: What we want to do is put code on each button so that the timer is set back to be 30 seconds of in-activity before being refreshed. Click to expand... Don't duplicate the code. Call a single sub from all buttons.
stingrae Active Member Licensed User Longtime User Sep 15, 2018 #3 yeah, you're right ... it does work ... i put the call on the reset in the wrong function ... Upvote 0