title: How do I access data from a docked form?
body: <p>I'm using <a href="http://sourceforge.net/projects/dockpanelsuite/" rel="nofollow">http://sourceforge.net/projects/dockpanelsuite/</a> as a docking control in my application and I have added a form as a docking container, and from it I need to access a string from the main form. I was just messing around to see if I could load it using (Owner as MainWindow), but it did not work.</p>
  
  <pre><code>        for (int i = 0; i &lt; (Owner as MainWindow).str.Count; i++)
          {
              MessageBox.Show("A");
          }
  </code></pre>
  
  <p>I always get an error on the first line "Object reference not set to an instance of an object." Is there any way I can access the string str (it is a public string btw) from the docked form?</p>
  
  <p>If it's unclear please let me know.</p>