Hi

I am trying to write a process that can detect application timeouts and I am doing it by creating a class that inherits systems.Timer.Timer

The timer is set at an interval of 1000ms and basically it checks thje position of the mouse pointer and if it hasn't moved for 20 minutes (a specified time) it will raise a AppTimeout event.

So far so good. (It does a little more than that as it tests for key presses also but this isn't relevant to the problem.

Now when the application that uses this class, detects this event it will performs a function could

ProcessLockScreen

that effectivly displays a form forcing the user to re-enter a user and password. Obviously this form is displayed modally - in fact it is displayed via a separate dll..

Now if I perform this section via the menu or toolbar - everything is ok. However if I perform the same section from the new class event - the Lock Screen form is still displayed. But not modally. Which kind of defeats the point. (I can still access the underlying form).

Has anyone any ideas on what is happening here, and how I could get around it?

Thanks