Groups | Blog | Home
all groups > dotnet windows forms > june 2004 >

dotnet windows forms : Application.Idle event does not work


Stoitcho Goutsev (100) [C# MVP]
6/16/2004 10:07:17 AM
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.

--
HTH
Stoitcho Goutsev (100) [C# MVP]


[quoted text, click to view]

james
6/16/2004 11:56:18 AM
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


[quoted text, click to view]

hirf-spam-me-here NO[at]SPAM gmx.at
6/16/2004 4:36:43 PM
* "Alok" <alok_sathaye@pune.tcs.co.in> scripsit:
[quoted text, click to view]

If a form is shown, the app is idle. You will have to implement the
"timeout" check yourself.

--
Herfried K. Wagner [MVP]
Alok
6/16/2004 4:40:44 PM
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 :)

AddThis Social Bookmark Button