PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Dispose problem/crash with maximized MDI child windows
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Dispose problem/crash with maximized MDI child windows
![]() |
Dispose problem/crash with maximized MDI child windows |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I am having a serious issue with my MDI child windows. This is with a
large VB.NET application that I ported over to VS 2005 from VS 2003. The problem is that, if the child window is maximized and then closed, it produces the following error message: Cannot access a disposed object Object name:'icon' in source System.Drawing And then the whole system crashes. Again, this ONLY occurs if the MDI child window is maximized within the MDI frame and then closed while it is maximized. I have reason to believe it has something to do with the MDI child window's icon. If I remove the icon from the child window (i.e. just use the VB.NET default) then it closes while maximized without any problem. I thought it might have something to do with the assigned icon not having a 16x16 size image, but I found one case where even then it still crashed. I am stumped at this point and can only assume this is some kind of ..NET 2.0 error/bug. This never had a problem at all in VS 2003 - only VS 2005. Anyone have ANY ideas as to how to fix this? I really hate to have to go thru all my windows and remove all the form icons.... Any help appreciated. Thanks in advance. Tom -- |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Seems you ran into this annoying bug 2 days before me.
I'm using C# in VS 2005. It's a brand new project (ie. not a port from VS 2003). I have the same symptoms as you. Try and close a maximized MDI childwindow, where you assigned an icon to your form, and wa-la, the application crashes. I've written MDI apps in VS 2003 and never, ever had this problem. This has to be a bug in .Net 2.0. I too don't want to remove our companies icon from all my forms, but at this point, do see any choice. Vince Tom wrote: > I am having a serious issue with my MDI child windows. This is with a > large VB.NET application that I ported over to VS 2005 from VS 2003. > The problem is that, if the child window is maximized and then closed, > it produces the following error message: > > Cannot access a disposed object > Object name:'icon' in source System.Drawing > > And then the whole system crashes. Again, this ONLY occurs if the MDI > child window is maximized within the MDI frame and then closed while it > is maximized. > > I have reason to believe it has something to do with the MDI child > window's icon. If I remove the icon from the child window (i.e. just > use the VB.NET default) then it closes while maximized without any > problem. I thought it might have something to do with the assigned icon > not having a 16x16 size image, but I found one case where even then it > still crashed. > > I am stumped at this point and can only assume this is some kind of > .NET 2.0 error/bug. This never had a problem at all in VS 2003 - only > VS 2005. Anyone have ANY ideas as to how to fix this? I really hate to > have to go thru all my windows and remove all the form icons.... > > Any help appreciated. Thanks in advance. > > Tom > -- |
|
|
|
#3 |
|
Guest
Posts: n/a
|
The problem is the System.Windows.Forms.MenuStrip not playing nice with
MDI child forms. The issue has been /bugged at connect.microsoft.com/VisualStudio/feedback. Until someone comes up with a real solution, either use the default Visual Studio icon for all your child forms, or do not set the MenuStrip.MdiWindowListItem property. For now, I'm choosing the latter (I don't have time to debug/workaround my development tool!) Vince Tom wrote: > I am having a serious issue with my MDI child windows. This is with a > large VB.NET application that I ported over to VS 2005 from VS 2003. > The problem is that, if the child window is maximized and then closed, > it produces the following error message: > > Cannot access a disposed object > Object name:'icon' in source System.Drawing > > And then the whole system crashes. Again, this ONLY occurs if the MDI > child window is maximized within the MDI frame and then closed while it > is maximized. > > I have reason to believe it has something to do with the MDI child > window's icon. If I remove the icon from the child window (i.e. just > use the VB.NET default) then it closes while maximized without any > problem. I thought it might have something to do with the assigned icon > not having a 16x16 size image, but I found one case where even then it > still crashed. > > I am stumped at this point and can only assume this is some kind of > .NET 2.0 error/bug. This never had a problem at all in VS 2003 - only > VS 2005. Anyone have ANY ideas as to how to fix this? I really hate to > have to go thru all my windows and remove all the form icons.... > > Any help appreciated. Thanks in advance. > > Tom > -- |
|
|
|
#4 |
|
Guest
Posts: n/a
|
The ID# is 166879 if you care to add anything to the issue. I recommed
you do as the squeaky wheel gets the grease. Vince vnoga wrote: > The problem is the System.Windows.Forms.MenuStrip not playing nice with > MDI child forms. The issue has been /bugged at > connect.microsoft.com/VisualStudio/feedback. > > Until someone comes up with a real solution, either use the default > Visual Studio icon for all your child forms, or do not set the > MenuStrip.MdiWindowListItem property. > > For now, I'm choosing the latter (I don't have time to debug/workaround > my development tool!) > > > Vince > > > Tom wrote: > > I am having a serious issue with my MDI child windows. This is with a > > large VB.NET application that I ported over to VS 2005 from VS 2003. > > The problem is that, if the child window is maximized and then closed, > > it produces the following error message: > > > > Cannot access a disposed object > > Object name:'icon' in source System.Drawing > > > > And then the whole system crashes. Again, this ONLY occurs if the MDI > > child window is maximized within the MDI frame and then closed while it > > is maximized. > > > > I have reason to believe it has something to do with the MDI child > > window's icon. If I remove the icon from the child window (i.e. just > > use the VB.NET default) then it closes while maximized without any > > problem. I thought it might have something to do with the assigned icon > > not having a 16x16 size image, but I found one case where even then it > > still crashed. > > > > I am stumped at this point and can only assume this is some kind of > > .NET 2.0 error/bug. This never had a problem at all in VS 2003 - only > > VS 2005. Anyone have ANY ideas as to how to fix this? I really hate to > > have to go thru all my windows and remove all the form icons.... > > > > Any help appreciated. Thanks in advance. > > > > Tom > > -- |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

