Hi everybody
I'm new with programming & VS.Net so i have many many questions...
I have a MainForm that is "IsMdiContainer=true" and another Form with three buttons, each button opens different forms(lets say form3,form4,form5). when any button is clicked i need to close the form(with the three buttons) and open form3 (or form4/form5).
The problem is that when i try to open form3/4/5 ,VS (in my fault) actually
try to open it within the form with the three buttons (althought i close it)
and got an exception ("The form that was specified to be the MdiParent for this form is not an MdiContainer").
private void button1_Click(object sender, System.EventArgs e)
{
this.Close();
MainForm s = new MainForm();
s.MdiParent = this.MdiParent;
Form3 InnerWindow = new Form3();
InnerWindow.MdiParent = this;
InnerWindow.Show();
}
i looked here but it didn't help me (i'm new with programming......)
http://www.xtremedotnettalk.com/showthread.php?t=85215
I'm new with programming & VS.Net so i have many many questions...
I have a MainForm that is "IsMdiContainer=true" and another Form with three buttons, each button opens different forms(lets say form3,form4,form5). when any button is clicked i need to close the form(with the three buttons) and open form3 (or form4/form5).
The problem is that when i try to open form3/4/5 ,VS (in my fault) actually
try to open it within the form with the three buttons (althought i close it)
and got an exception ("The form that was specified to be the MdiParent for this form is not an MdiContainer").
private void button1_Click(object sender, System.EventArgs e)
{
this.Close();
MainForm s = new MainForm();
s.MdiParent = this.MdiParent;
Form3 InnerWindow = new Form3();
InnerWindow.MdiParent = this;
InnerWindow.Show();
}
i looked here but it didn't help me (i'm new with programming......)
http://www.xtremedotnettalk.com/showthread.php?t=85215