Application.Idle event does not work

  • Thread starter Stoitcho Goutsev \(100\) [C# MVP]
  • 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.
 
H

Herfried K. Wagner [MVP]

* "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.
 
J

james

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
 
A

Alok

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top