Bindings, Bindings and more Bindings

Bindings in WPF are great and can accomplish so many things.  But how many times have you been in the position of trying to do any of the following: Bind simple POCOs together Apply a binding to an object outside of your xaml file Bind the same property more than once (say once with OneWayToSource…


Managed Spy — A new way to look at Windows Forms applications

I just wrote an article for msdn magazine, “Managed Spy: Deliver The Power Of Spy++ To Windows Forms With Our New Tool” This tool is a combination of an application (exe) and library (dll).  The application gives you a spy++ view of all managed processes and thier child windows.  Unlike spy++, managed spy allows you…


New VS feature allows VS to crash!

One of the newer “features” in Visual Studio 8.0 is the ability for us to collect better information about exceptions that are thrown in VS.  When an exception is thrown (and unhandled), VS will generate a Watson report that will send microsoft a minidump where the exception occurred.  Once we get this watson report, its…


Fixing Window leaks and "Class Already Registered" errors

Windows Forms makes it very easy to create a rich UI experience.  But it also makes it easy to leak windows or resources. For example, say you create a new temporary AppDomain and decide to show some UI in it.  If you close the AppDomain without cleaning up the windows (ie call Dispose on the…


SpyWindowFinalizer and Windows Message Hooking

One very powerful API that some UI developers may not be aware of is SetWindowHookEx.  This api allows you to intercept all types of window messages before (or after) they are processed. You can use this to do a whole range of neat things.  For instance, you can log all messages in your app.  You…


Control.Invoke hangs under heavy stress

There have been reports of Control.Invoke hanging after the method completes.  This was reported by a few customers and we have fixed this.  For your reference: ID: SRX050308605416 KB Article: 896665 The problem stems from some of the errors I describe in my previous post.  IsCompleted will be “true”, but the AsyncWaitHandle will never be set.  The fix will…


Is this code threadsafe?

Here is a question for you multithreaded coders out there. After executing Thread1 and Thread2, what are the possible values for “i”?         bool b1 = false;        bool b2 = false;        int i = 0;         private void Thread1() {            b1 = true;            if (b2) {                i = 1;            }        }         private void Thread2()…


Deployment help! in VS 2003

I recieved a request for information and deployment and our deployment expert pointed me to this share.  Let me know if it helps.


Wireless MP3 is HERE!

I sent this as feedback on another persons blog — but I’ve got to plug in some free advertising for Creative Labs.  This setup is incredible. It took me about 15 minutes to set up over my existing 802.11 (wireless) network at home.  It would have taken less, but I have security enabled on…


Having assembly binding problems?

If you’re getting assembly load errors and cannot figure out why, you can use the fusionlog viewer to help figure it out.  The fusion log will show exactly how all managed assemblies were resolved. Check out: This includes retargeted assemblies.  For example, if you run your device application on the desktop, compact framework assemblies…