Application.Idle event does not work

  • Thread starter Thread starter Stoitcho Goutsev \(100\) [C# MVP]
  • Start date Start date
S

Stoitcho Goutsev \(100\) [C# MVP]

Hi Alok,

I can't say anything looking at the pseudo code I posted, but anyways you
can't use the Idle event for this, I believe. Idle is fired when the message
queue becomes free and this happens quite often. Fortunately it is nearly
impossible to keep the message queue full. You should consider some other
techniques.
 
* "Alok said:
My application starts with the login form. After that the main form is
loaded on successfull login.
I need to show a time out screen if there is no user activity.
What happens is that the timeout screen popups regularly after the main form
is loaded even though i am performing actions.
Why is this so ??

If a form is shown, the app is idle. You will have to implement the
"timeout" check yourself.
 
After loading the form, start a timer running for the duration you decide is
the amount to timeout. Then catch each keystroke, and re-set the timer. If
the timer fires then timeout the screen.

JIM
 
Hi,
My application starts with the login form. After that the main form is
loaded on successfull login.
I need to show a time out screen if there is no user activity.
What happens is that the timeout screen popups regularly after the main form
is loaded even though i am performing actions.
Why is this so ??

Code snippet:

Addhandler Application.Idle, idle_Event_Handler
Application.Run(New LoginForm)

in login Form, OK button click:
'Check for successful login
'Show Main Form
'Hide Login screen

TIA :)
 
Back
Top