Need help salvaging a form

I was developing a form using split containers within other split containers. I changed the name of one of the split containers and, after I did, I was no longer able to view the form in the .NET designer. Instead, I get an error page that says:

One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.

The two errors I received were:

A circular control reference has been made. A control cannot be owned by or parented to itself.

SplitterDistance must be between Panel1MinSize and Width - Panel2MinSize.

I made some adjustments to the designer code and that got rid of those two errors in the error list at the bottom of my screen. But when I attempt to view the form by clicking on it, I still get the error page with the two errors.

Someone please help. I'm hoping that I don't have to recreate the form's components from scratch. Any help would be greatly appreciated!

Comments

: : Hi,: : I was developing a form using split containers within other split containers. I changed the name of one of the split containers and, after I did, I was no longer able to view the form in the .NET designer. Instead, I get an error page that says:: : One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. : : : The two errors I received were:: : A circular control reference has been made. A control cannot be owned by or parented to itself. : : SplitterDistance must be between Panel1MinSize and Width - Panel2MinSize. : : : I made some adjustments to the designer code and that got rid of those two errors in the error list at the bottom of my screen. But when I attempt to view the form by clicking on it, I still get the error page with the two errors.: : Someone please help. I'm hoping that I don't have to recreate the form's components from scratch. Any help would be greatly appreciated!: Hi, are you using .NET 1.1 or .NET 2.0? They differ in desing-data location, but I guess you've already find this.(.NET 1.1 - at the begining of FormName.vb file)(.NET 2.0 - in separate FormName.design.vb file)

The schema of that desing-code part is clear. There are ControlName = New ControlClassname()and later, setting properties and owners. You'll have to track this part and find that cycle. It means:Let's say, you have 3 containers (panels, or some other control that can have child controls) named pa, pb, pc.me.pa=new... pb=new... pc=new..

pa.controls.add(pb)pb.controls.add(pc)This means that pc is inside pb, and pb is inside pa. pa is direcly on form (like form.controls.add(pa)), and world is nice, no cycles are present.

But if you append pc.controls.add(pa), you add cycle pa->pb->pc->pa and so on..

Take that desing-part code and track changes and appending one control to another. I suggest you to draw control tree.You're looking for ANY cycle in this tree (there may exist much longer cycle that this triangle one). Removing any branch from this cycle will fix your problem. But be carefull which part are you removing to keep logical assignemt of containers..

and finally, find all "SplitterDistance" properties and check their value.