.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.
The journal
149 articles on building software and understanding how it works.
"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.
Windows kept detecting my X-Fi's plugs in and out at random, so the speakers did too. The fix is a registry key: EnableDynamicDevices = 0. Took me days to find, hope it saves you the trouble.
A starter platform for Kinect hacking in C#: MVVM-bound module engine, sample modules doing silly image processing, easy to extend with your own. Buy a Kinect, install drivers, open this project and start playing.
Bought a Kinect, hooked it up to the PC, fought the drivers for a couple of hours — and then got raw image data access working in C#. Sample code for fast access to the Kinect's byte stream.
88 projects across 22 solutions needed to become one solution, and Visual Studio crashed trying. So I brushed off my black belt in Perl regex and wrote a script that merges .sln files automatically.
Ah! THERE's your problem! A screenshot that speaks for itself.
Every now and then I get a bright idea for a compression algorithm. This one took 3.5 hours to compress the 5 characters "Tedd!" into 7 characters, after 143 billion iterations. Not every bright idea survives contact with math.
Active Directory lets NTDS, NTFrs and NetLogon pick random ports, which makes firewalling a domain controller a pain. Here is how to pin them to fixed ports and finally enable the firewall.
Playing Age of Conan wasn't enough tinkering, so I wrote an app that screenshots the game window, analyzes the pixels and reacts — totally useless, great fun, and a nice excuse to play with image analysis in C#. Source included.
The VS2010 conversion wizard is defect: it tries to rewrite your code when only the solution and project files actually need changing. Convert, then keep only the new .sln and .csproj — step-by-step guide inside.
Varnish claims to be "10 times faster than squid" but isn't built to be a general internet proxy — so I chained it with Squid on a Debian box for my cable modem. The full setup, step by step.
Sweet — status window and channels opening through pure binding to the ViewModel.
I hoped WPF had left WinForms' GUI-thread invoking behind. Then BindingList and DependencyProperty both demanded GUI thread invocation from my ViewModel — which isn't supposed to know the GUI exists. ARGH.
First working window after the MVVM refactoring — including a homemade MDI window, since WPF doesn't have one.
A personal rant on whether to use MVVM, written while heavily refactoring my IRC client. Comparing MVVM with my current module architecture — clearly MVVM is not optimal, but there might be parts worth borrowing.