M
Michael Howes
I and trying to detect idle time or sorts in the applications I'm
building.
To do this the main Form also inherits from IMessageFilter and I
listen for WM_MOUSEMOVE. When that happens I reset a DateTime.
To check the time between last mouse move I have a timer
(System.Threading.Timer)
If the the DateTime math meets a certain threshold I want to show our
login dialog, essentially locking people out of this unattended app.
When I try and ShowDialog() on my login form I get a threading error
because of the owner I try and pass in.
this failed so I tried packing up the main form in the thread so it
was passed as an argument (object state) of the timer and use that
instead of this in the timer callback but that didn't work either.
what's the proper way to show the login dialog when shown because of a
timer?
thanks
mike
building.
To do this the main Form also inherits from IMessageFilter and I
listen for WM_MOUSEMOVE. When that happens I reset a DateTime.
To check the time between last mouse move I have a timer
(System.Threading.Timer)
If the the DateTime math meets a certain threshold I want to show our
login dialog, essentially locking people out of this unattended app.
When I try and ShowDialog() on my login form I get a threading error
because of the owner I try and pass in.
this failed so I tried packing up the main form in the thread so it
was passed as an argument (object state) of the timer and use that
instead of this in the timer callback but that didn't work either.
what's the proper way to show the login dialog when shown because of a
timer?
thanks
mike