I've published a fix to the code accompanying the article "Delayed event handling for WinForms applications." ([url]http://www.vbinfozine.com/a_deh.shtml[/url].) This fix is available at [url]http://www.vbinfozine.com/c/deh.zip[/url].
Please download and use the updated DelayedEventDispatcher.vb/cs classes, otherwise your application can end up invoking processing for a single event multiple times.
This can happen if your event handling code yields control to Windows (for example by calling the Application.DoEvents method). In these cases, the old DelayedEventDispatcher could invoke your event handling code multiple times, sometimes even resulting in a StackOverflowException.
The fix is in the DelayedEventDispatcher.HandleEvent method (in both VB.NET and C# versions). Please update the DelayedEventDispatcher.vb/cs files in all your projects that are using them. Or, if you're using the LaMarvin.Windows.Forms.Events.dll assembly, replace the assembly in your source directory with the new one and recompile all applications that reference it.
Kudos to Matt Stone for discovering this issue. Thanks Matt!
I'm sorry for any inconvenience this might have caused to you.
Palo
|