
{filelink=17882}
using System;
using System.Windows.Forms;
namespace mesexemples
{
public class EvenementIdle : Form
{
public EvenementIdle()
{
Text = "Exemple des événements 'Form'!";
}
public static void Main()
{
EvenementIdle FormObject = new EvenementIdle();
ApplicationEventHandlerClass AppEvents = new ApplicationEventHandlerClass();
Application.Idle += new EventHandler(AppEvents.OnIdle);
Application.Run(FormObject);
}
}
public class ApplicationEventHandlerClass
{
public void OnIdle(object sender, EventArgs e)
{
Console.WriteLine("L'application est au repos.");
}
}
}