MDI form
-
i have two form: Form1, Form2 and Form3. Form1 is MDI Parent form. i'v made Form2 to open when one menu is clicked from Form1. Now Form2 has one button which should show Form3, and i'v done the code this way:
Form3 frmF3 = new Form3(); Form1 fm1 = new Form1(); frmF3.MdiParent = fm1; frmF3.Show();
but clicking the button is performing nothing. how can i do that? -
i have two form: Form1, Form2 and Form3. Form1 is MDI Parent form. i'v made Form2 to open when one menu is clicked from Form1. Now Form2 has one button which should show Form3, and i'v done the code this way:
Form3 frmF3 = new Form3(); Form1 fm1 = new Form1(); frmF3.MdiParent = fm1; frmF3.Show();
but clicking the button is performing nothing. how can i do that?Dear, Try to structure your code by doing the following: -In form3 add the following Function: public void Create(Form ParentWnd) { MdiParent = ParentWnd; Show(); } - Now from Form2 do the follwing from a function of course: Form3 form3 = new Form3(); Form ParentForm = this.MdiParent; form3.Create(ParentForm); I've been programming since year 1999, graduated from Univeristy Paris 2 France, fluent in C,C++,VC++,Web programming (XML,HTML,php etc..),.NET frameworks,C# and ASP.NET,SQL server, Mastering VC++ .NET and SQL server,data structure and database design
-
Dear, Try to structure your code by doing the following: -In form3 add the following Function: public void Create(Form ParentWnd) { MdiParent = ParentWnd; Show(); } - Now from Form2 do the follwing from a function of course: Form3 form3 = new Form3(); Form ParentForm = this.MdiParent; form3.Create(ParentForm); I've been programming since year 1999, graduated from Univeristy Paris 2 France, fluent in C,C++,VC++,Web programming (XML,HTML,php etc..),.NET frameworks,C# and ASP.NET,SQL server, Mastering VC++ .NET and SQL server,data structure and database design