[Mono-bugs] [Bug 487896] Application.Idle works differently depending on OS/framework

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue May 26 07:57:23 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=487896

User tommi.s.e.laukkanen at gmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=487896#c3





--- Comment #3 from Tommi Laukkanen <tommi.s.e.laukkanen at gmail.com>  2009-05-26 05:57:22 MDT ---
The following custom application event loop seems to work for me as a
workaround in .NET and Windows Vista mono. Things to add include timing
functionality to deduce when to invoke Appdlication_Idle:

#region Application Custom Event Loop

private static bool isShutdownRequested = false;

private static void CustomEventLoop()
{
    MainForm.Closing += MainForm_Closed;
    MainForm.Visible = true;
    while(!isShutdownRequested)
    {
        Application_Idle(null, null);
        Application.DoEvents();
    }
}

private static void MainForm_Closed(object sender,
System.ComponentModel.CancelEventArgs e)
{
    isShutdownRequested=true;
}

#endregion

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list