G
Guest
Hey guys.
Under what circumstances is HandleDestroyed called? Is it only called when
a control is being Disposed?
I sometimes get the following exception in my app:
UnhandledThreadException, Exception='System.NullReferenceException: Object
reference not set to an instance of an object.
at System.Windows.Forms.ListViewItemCollection.get_Item(Int32 displayIndex)
at System.Windows.Forms.ListView.OnHandleDestroyed(EventArgs e)
at System.Windows.Forms.Control.WmDestroy(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)'
Has anyone seen this before or have any ideas on how I can debug it? It
happens randomly and rarely so I can't reproduce it.
Thanks
Under what circumstances is HandleDestroyed called? Is it only called when
a control is being Disposed?
I sometimes get the following exception in my app:
UnhandledThreadException, Exception='System.NullReferenceException: Object
reference not set to an instance of an object.
at System.Windows.Forms.ListViewItemCollection.get_Item(Int32 displayIndex)
at System.Windows.Forms.ListView.OnHandleDestroyed(EventArgs e)
at System.Windows.Forms.Control.WmDestroy(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)'
Has anyone seen this before or have any ideas on how I can debug it? It
happens randomly and rarely so I can't reproduce it.
Thanks