上記の現象について調査中
デバッグモードであえて例外を出した場合のスタックトレースは
StackTrace " at WindowsApplication1.Form1.monthCalendar1_DateChanged(Object sender, DateRangeEventArgs e) in c:\\documents and settings\\xxx\\my documents\\visual studio projects\\windowsapplication1\\windowsapplication1\\form1.cs:line 122
at System.Windows.Forms.MonthCalendar.OnDateChanged(DateRangeEventArgs drevent)
at System.Windows.Forms.MonthCalendar.WmDateChanged(Message& m)
at System.Windows.Forms.MonthCalendar.WmReflectCommand(Message& m)
at System.Windows.Forms.MonthCalendar.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
at System.Windows.Forms.Control.WmNotify(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.MonthCalendar.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsApplication1.Form1.Main() in c:\\documents and settings\\xxx\\my documents\\visual studio projects\\windowsapplication1\\windowsapplication1\\form1.cs:line 104" string
Windows Messageが飛んでいるのでSpySpy
Message 204E
wParam: 00A81074
lParam: 0012EC2C
さてこの現象いったい何なんでしょうね。
WM_TIMERも飛んできているので何かがわざと発生させているような気はしますが・・・
追記1
Release, Debug関係ないですね。
とりあえずe.Start = e.Endの場合には処理をしないなんてことをしたほうがよさそう。
追記2
Visual Studio 2005でも発生しますね。