<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Need help salvaging a form' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Need help salvaging a form' posted on the 'VB.NET' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 02:35:28 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 02:35:28 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Need help salvaging a form</title>
      <link>http://www.programmersheaven.com/mb/VBNET/349696/349696/need-help-salvaging-a-form/</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The two errors I received were:&lt;br /&gt;
&lt;br /&gt;
A circular control reference has been made. A control cannot be owned by or parented to itself. &lt;br /&gt;
 &lt;br /&gt;
SplitterDistance must be between Panel1MinSize and Width - Panel2MinSize. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/349696/349696/need-help-salvaging-a-form/</guid>
      <pubDate>Mon, 27 Nov 2006 15:56:15 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Need help salvaging a form</title>
      <link>http://www.programmersheaven.com/mb/VBNET/349696/349770/re-need-help-salvaging-a-form/#349770</link>
      <description>: &lt;br /&gt;
: Hi,&lt;br /&gt;
: &lt;br /&gt;
: 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:&lt;br /&gt;
: &lt;br /&gt;
: 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. &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: The two errors I received were:&lt;br /&gt;
: &lt;br /&gt;
: A circular control reference has been made. A control cannot be owned by or parented to itself. &lt;br /&gt;
:  &lt;br /&gt;
: SplitterDistance must be between Panel1MinSize and Width - Panel2MinSize. &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: 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.&lt;br /&gt;
: &lt;br /&gt;
: 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!&lt;br /&gt;
: &lt;br /&gt;
Hi,&lt;br /&gt;
  are you using .NET 1.1 or .NET 2.0? They differ in desing-data location, but I guess you've already find this.&lt;br /&gt;
(.NET 1.1 - at the begining of FormName.vb file)&lt;br /&gt;
(.NET 2.0 - in separate FormName.design.vb file)&lt;br /&gt;
&lt;br /&gt;
The schema of that desing-code part is clear. There are &lt;br /&gt;
ControlName = New ControlClassname()&lt;br /&gt;
and later, setting properties and owners. You'll have to track this part and find that cycle. It means:&lt;br /&gt;
Let's say, you have 3 containers (panels, or some other control that can have child controls) named pa, pb, pc.&lt;br /&gt;
me.pa=new... &lt;br /&gt;
pb=new... &lt;br /&gt;
pc=new..&lt;br /&gt;
&lt;br /&gt;
pa.controls.add(pb)&lt;br /&gt;
pb.controls.add(pc)&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
But if you append pc.controls.add(pa), you add cycle pa-&amp;gt;pb-&amp;gt;pc-&amp;gt;pa and so on.. &lt;br /&gt;
&lt;br /&gt;
Take that desing-part code and track changes and appending one control to another. I suggest you to draw control tree.&lt;br /&gt;
You're looking for ANY cycle in this tree (there may exist much longer cycle that this triangle one). &lt;br /&gt;
Removing any branch from this cycle will fix your problem. But be carefull which part are you removing to keep logical assignemt of containers..&lt;br /&gt;
&lt;br /&gt;
and finally, find all "SplitterDistance" properties and check their value.&lt;br /&gt;
&lt;br /&gt;
Make backup of your files before making changes! ;)&lt;br /&gt;
&lt;br /&gt;
Hope this helps&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: Blue;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="font-size: medium;"&gt;P&lt;/span&gt;avlin &lt;span style="font-size: medium;"&gt;II&lt;/span&gt;&lt;/em&gt;[/size]&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: Purple;"&gt;Don't take life too seriously anyway you won't escape alive from it!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/349696/349770/re-need-help-salvaging-a-form/#349770</guid>
      <pubDate>Wed, 29 Nov 2006 12:46:38 -0700</pubDate>
      <category>VB.NET</category>
    </item>
  </channel>
</rss>