i have 3 forms.
form1 is main form i.e parent form and ismdicontainer propery set to true in form1.
- //here is form 1 button click for form 2 open
- private void button1_Click(object sender, EventArgs e)
- {
- Form2 f2 = new Form2();
- f2.ShowDialog();
- }
now i want to form 2 button click then form2 close and form3 open a child in to form1 parent.
trying below code
- // form2 button click for form3 open and form 2 close
- private void button1_Click(object sender, EventArgs e)
- {
- //hide form2
- this.Hide();
- //open form 3
- Form3 f3 = new Form3();
- f3.MdiParent = Form1.ActiveForm;
- f3.Show();
- //close form2
- this.Close();
- }
form 2 closed but form3 not open as a child form3 to parent form1.
please share correct code.its helpful for me.iam new in this.just iam learning and try to make small application.
sorry for my bad launguage.
Viswanatha SwamyPosted Mar 22, 2020, 11:17 AM
cad sunnyPosted Mar 22, 2020, 1:03 AM
cad sunnyPosted Mar 21, 2020, 12:26 PM
Viswanatha SwamyPosted Mar 21, 2020, 12:22 PM
cad sunnyPosted Mar 21, 2020, 12:04 PM
Viswanatha SwamyPosted Mar 21, 2020, 10:34 AM
Viswanatha SwamyPosted Mar 21, 2020, 8:09 AM