i has 3 forms: FormA, FormB and FormC, the form of which A is the mdiParent form, and the form B and C are children. I am writing the following code in a FormA load event.
private void frmMain_Load(object sender, EventArgs e)
{
formB.MdiParent = this;
formC.MdiParent = this;
formB.Show();
}
what i want is when i press the button on FormB, FormC should be shown. now for this I will need to create another instance of FormC in the button click event in FormB or will I need to use the instancce created in FormA ???
if you need to create a separate instance, can someone explain the reason for this?
edit - the answer that Oded gave suits me. but can I make the return type of the property as Form [] to add more than 1 link, so that if I want to return from FormC to FormB, I can use a similar method?
also, if I want to transfer some data from FormB to FormC, then how can I do this?
source
share