ExceptionBox

作りかけ。一応動くけど、もちっと考えたほうがよさそう。
Microsoft.ExceptionMessageBox.dll必須。

using System;
using Microsoft.SqlServer.MessageBox;
using System.Windows.Forms;

namespace 例外
{
    /// <summary>
    /// 例外を表示するダイアログボックス
    /// </summary>
    public static class ExceptionBox
    {
        /// <summary>
        /// 例外を表示する。
        /// </summary>
        /// <param name="owner">親ウィンドウ</param>
        /// <param name="ex">例外</param>
        public static void Show(IWin32Window owner, Exception ex)
        {
            //Exception newEx = new Exception(ex.GetType().FullName, ex);
            
            //ExceptionMessageBox box = new ExceptionMessageBox(newEx);
            ExceptionMessageBox box = new ExceptionMessageBox(ex);
            box.Beep = false;
            //box.InnerException = newEx;
            box.Buttons = ExceptionMessageBoxButtons.OK;
            box.Show(owner);
        }
    }
}

追記

d:id:maangie:20100817に改良(?)版を作ってみました。