I'm using http://sourceforge.net/projects/dockpanelsuite/ 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.
for (int i = 0; i < (Owner as MainWindow).str.Count; i++)
{
MessageBox.Show("A");
}
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?
If it's unclear please let me know.