
how to use the Application.Idle in windows forms application??
Posted Thursday, 17 June, 2010 - 15:27 by Jaws inHello guys:
because the Application.Idle in C# is ok, but how to use it in the windows forms application.
look at the code:
Application::Idle+=gcnew EventHandler(Application1_Idle);
and the error
1>c:\users\bureautique\documents\visual studio 2010\projects\otk\otk\Form1.h(135): error C3867: &'OTK::Form1::Application1_Idle' : liste d'arguments manquante dans l'appel de fonction ; utilisez 'OTK::Form1::Application1_Idle' pour créer un pointeur vers membre
can anyone give me a hand?


Comments
Re: how to use the Application.Idle in windows forms ...
I'm not very familiar with C++/CLI, but I *think* you need to pass the instance of the class explicitly when creating a delegate (unlike C#). Assuming your class is named "Form1" and you are hooking Application::Idle from inside that class, you'd need something like: