I have an application that sporadically throws this exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: "Panel".
bei System.Windows.Forms.Control.CreateHandle()
bei System.Windows.Forms.Control.get_Handle()
bei System.Windows.Forms.ContainerControl.FocusActiveControlInternal()
bei System.Windows.Forms.Form.set_Active(Boolean value)
bei System.Windows.Forms.Form.WmActivate(Message& m)
bei System.Windows.Forms.Form.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Is there a way to suppress this exception ideally without touching the code? I am thinking about some registry magic or esoteric .NET configs.
Furthermore I am of course also interested in ways to catch this exception. There seems to be no hook for me to catch this exception... And of course it is not reproducible...