Archives

Archives / 2007 / October
  • A WPF wrapper around Windows Form NotifyIcon

    Because WPF do not have a Notify Icon control, I decided implement a WPF control that wraps the Windows Form control. It only covers the basic functionality, but I believe that it is enough for most scenarios. Enjoy it !

    Read more...

  • Unhandled exceptions in children threads

    When an exception is thrown in a thread that is not the main thread, it can be catch with the event UnhandledException of the AppDomain class. However attaching this event can not avoid the application to crash.

    There are two ways to workaround this issue:

    1. One of this is managed the exceptions explicitly with try ... catch in each thread, the catch statement would have to handle the exception and not rethrown it.
    2. The second solution is set the CLR work as in the previous versions (1.0 and 1.1). It is not a recommended approach. In order to do that you need add the following configuration setting in your application configuration file:

    <runtime>

        <legacyUnhandledExceptionPolicy enabled="1"/>

    </runtime>

    Read more...