[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 380
  • Last Modified:

VB.Net 2010 Managing MDI forms

I have an application that allows multiple MDI children to be opened at a time.  I added a button  to each to allow them to be "un-docked" or "emancipated" from the MDI parent, in case the user wants to move it to another part of the screen or re-size it outside of the MDI container form.  To do this I set Me.mdiparent=Nothing on the Child form.

This works fine.  

I also added a button to "move back in" with the parent form.  Basically, re-establish the MDI relationship.

I simply set Me.MdiParent=frmParent.  This appears to work and sometimes does OK.  But more often than not, the program soon crashes with the following error message:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Am I trying to do something that can't be done?

If it can be done, how do I code the two moves?

If not, any suggestions as to working around the problem?

Thanks
0
lweekly
Asked:
lweekly
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
I can't seem to reproduce the error.  Can you show some more code and/or a screencast of the error occurring?
0
 
lweeklyAuthor Commented:
The problem was actually with a COM control on the form.  Once I got an updated version of it, all was OK.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now