← All topics

2 articles in the notebook

WinForms.

.Net GUI thread crossing

"Cross-thread operation not valid" explained from the ground up: what the GUI thread actually does, why only it may touch your controls, and how to cross over correctly in WinForms and WPF.

C# / .Net WinForms GUI Thread Invoke solution

Tired of Invoke-ing the GUI thread from every background thread, I ran Reflector on WinForms' Form, generated a partial class with a Perl script, and got a Form where every method safely invokes the GUI thread automatically. A quick hack, but it works.