Exemple d’utilisation de l’etat ‘au repos’

Author:

Utilitaire,Plateforme:,non,edité
{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.");
        }
    }

}

Leave a Reply

Your email address will not be published. Required fields are marked *