Using 2 TopLevel forms
-
Hello i hope it desn't sound like a dumb question .. i have application which i want to have several forms the first one will create the second and will hide and when second is disposed i want to show the first one. both of them are toplevel forms . when i try the following code i get an error :"Cannot add a top level control to a control"
Form a1 = new Form2(); a1.Parent = this; a1.Show();
any help will do . i want to be able to unhide the Form1 from form2. Thanks:confused: Have a nice Day -
Hello i hope it desn't sound like a dumb question .. i have application which i want to have several forms the first one will create the second and will hide and when second is disposed i want to show the first one. both of them are toplevel forms . when i try the following code i get an error :"Cannot add a top level control to a control"
Form a1 = new Form2(); a1.Parent = this; a1.Show();
any help will do . i want to be able to unhide the Form1 from form2. Thanks:confused: Have a nice Day -
Create a new constructor for Form2 with a form1 parameter Form2(Form1 frm1) { } when opening form2, hide form1 and when closing form2 show form1