Hello,
We have experiencing a problem with our MDI application that
'System.ObjectDisposedException' occurs while starting the application.
Following is the stack trace for the exception.
Note that the application first shows a Login form as a child form.
System.ObjectDisposedException: Cannot access a disposed object named
"Label".
Object name: "Label".
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(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.WmShowWindow(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.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
It is important to note that it doesn't happen regularly, it just
appears suddenly (1 out of 200 times) but still it is irritating for the
end user. Any suggestions/workarounds?
Cheers.
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
joeycalisay - 21 Feb 2005 10:14 GMT
someone is accessing the disposed Label instance. As a safety, you should
have a check if a control that you are using is disposed using the
IsDisposed property of Control.
For the meantime, to get the line that really caused the problem, try to
catch the exception the moment it was thrown. For the procedure, just in
case you don't know, try this link:
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.windowsfor
ms/browse_thread/thread/3654e67e17cfefcf/f760aad7837d9cef?_done=/group/microsoft
.public.dotnet.framework.windowsforms/?&_doneTitle=Back+to+topics&_doneT
itle=Back&&d#f7

Signature
Joey Calisay
http://spaces.msn.com/members/joeycalisay/
> Hello,
> We have experiencing a problem with our MDI application that
[quoted text clipped - 31 lines]
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!