By David Jones
I developed this program recently as an exercise in porting some of my boilerplate Borland C++
Builder code to C#. It specifically illustrates processing non-critical
activities when the application goes into idle by creating it's own OnIdle
Event Handler and assigning it to the Application.Idle event as follows:
Application.Idle += new EventHandler(OnIdle);
It is used to perform enabling/disabling of the Window MDI menu items
dependant on whether any child windows are open. Also, it reviews the status
of the CAPS, NUM and SCRL keys and displays the result in the status bar.
This works even if there is a modal window open - the About Box in this
example.
Download OnIdleExample.zip