D
Dan
Hi,
I have a timer on a form (System.Windows.Forms.Timer - Framework 1.1) that
is set to 60 seconds as sort an of inactivity monitor. If 60 seconds have
elapsed without any user activity I want the form to close. I stop/start
the timer at button clicks and keydown events etc of the various controls on
the form. Users have reported the form closing in the middle of them typing
or immediately after opening the form (but only rarely). (The timer is
design-time set to Enabled = false, Interval = 60000) I think I saw this
occur once during testing where an event fired that should have reset the
timer and about 15 seconds later the tick event fired. As a workaround
possibly I am going to store the time of the last reset so that I can
compare to the time when the tick event fires (ie if only 15 seconds have
elapsed instead of 60 then don't do anything). This of course won't help if
rather than a timer failure, its the keydown and other events that are not
firing. Any similiar experiences or other suggestions for monitoring
inactivity (such as using the thread timer).
Regards,
Dan
I have a timer on a form (System.Windows.Forms.Timer - Framework 1.1) that
is set to 60 seconds as sort an of inactivity monitor. If 60 seconds have
elapsed without any user activity I want the form to close. I stop/start
the timer at button clicks and keydown events etc of the various controls on
the form. Users have reported the form closing in the middle of them typing
or immediately after opening the form (but only rarely). (The timer is
design-time set to Enabled = false, Interval = 60000) I think I saw this
occur once during testing where an event fired that should have reset the
timer and about 15 seconds later the tick event fired. As a workaround
possibly I am going to store the time of the last reset so that I can
compare to the time when the tick event fires (ie if only 15 seconds have
elapsed instead of 60 then don't do anything). This of course won't help if
rather than a timer failure, its the keydown and other events that are not
firing. Any similiar experiences or other suggestions for monitoring
inactivity (such as using the thread timer).
Regards,
Dan