C# Source Code: Tip: Capturing an application "idle" event
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
C# Source Code
Tip: Capturing an application "idle" event
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Wednesday, May 26, 2004
Hits:
1129
Category:
Windows Forms/GUI/Controls
Article:
One of the many useful features included within .NET is the Application.Idle event. This is raised when the message loop stops performing it's current task. This can be used to perform low priority tasks or simply to set the text in a status bar to "Idle...". To capture this event do the following: private void Form1_Load(object sender, System.EventArgs e) { //Hook the idle event Application.Idle += new EventHandler(OnIdle); } private void OnIdle(object sender, EventArgs e) { // Perform Idle processing here... }
Terms and Conditions
Support this site
Download a trial version of the best FTP application on the internet