Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Application.idle event issue

Reply
 
Old 03-11-2009   #1 (permalink)
Muthu


 
 

Application.idle event issue

In our application, in the Application.idle event the controls are validated
and enabled. As the idle event is fired when the application queue is empty,
the validation and enabling of controls is firing continuously. This
implementation makes the system using 10% CPU processing time when 10 or more
users are using the application because most applications spend 99% of their
time in an idle state.

When I moved the control validation and enabling activity into the mouse and
keyboard events of the Mainframe class, the events are firing only keyboard
and mouse events of the Mainframe class and not always.

Can you anyone please give an alternate solution for this problem?


My System SpecsSystem Spec
Old 03-16-2009   #2 (permalink)
Morten Wennevik [C# MVP]


 
 

RE: Application.idle event issue

"Muthu" wrote:
Quote:

> In our application, in the Application.idle event the controls are validated
> and enabled. As the idle event is fired when the application queue is empty,
> the validation and enabling of controls is firing continuously. This
> implementation makes the system using 10% CPU processing time when 10 or more
> users are using the application because most applications spend 99% of their
> time in an idle state.
>
> When I moved the control validation and enabling activity into the mouse and
> keyboard events of the Mainframe class, the events are firing only keyboard
> and mouse events of the Mainframe class and not always.
>
> Can you anyone please give an alternate solution for this problem?
>
? Why would you use Application.Idle? I would consider getting notified on
Idle for tasks that should run when the user is 'away'. I may be missing
something, but control validation typically happens when you move (or attempt
to move) away from a control, or as part of a user action like clicking on a
submit-button or similar.

If you give us more detailed information regarding your application we can
give you better design suggestions.

--
Happy Coding!
Morten Wennevik [C# MVP]
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Copy Application Event Logs For Past 30 Days To XLS VB Script
Event 4226 & TCP connection issue Vista networking & sharing
Problem Event Name: AppHangXProcB1 Application Name: Explorer.E Vista file management
Application Event Viewer errors at startup. Vista Ultimate x32 Vista performance & maintenance
Application Event 1530 causes system to hang or randonly reboot Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46