G
Guest
Hi,
I am writing a program that handles authentication, and based on the user's
permission level, can do certain things in the program. However, I want to
have a global 10 minute time out in case a user is idle for that amount of
time.
To do this, I am using a timer from System.Timers. At the end of the 10
minute timeout, I want the timer to call methods within the program to limit
access to certain functionality. However, the problem is that the timer is
working on a different thread, and so calls to these methods will also be on
this thread, which is not the owner thread of the controls I am trying to
alter, and so I'm getting an exception.
How can I tell the owner thread to manipulate the controls?
Thanks!
I am writing a program that handles authentication, and based on the user's
permission level, can do certain things in the program. However, I want to
have a global 10 minute time out in case a user is idle for that amount of
time.
To do this, I am using a timer from System.Timers. At the end of the 10
minute timeout, I want the timer to call methods within the program to limit
access to certain functionality. However, the problem is that the timer is
working on a different thread, and so calls to these methods will also be on
this thread, which is not the owner thread of the controls I am trying to
alter, and so I'm getting an exception.
How can I tell the owner thread to manipulate the controls?
Thanks!