I am instantiating a child form e.g
1.EnterColor colorform=new EnterColor();
2.colorform.Parent = this; //this is the current
3.colorform.Show();
It gives me error at line 2 \
{"Cannot add a top level control to a control." }
Basically I need do some calculation in the child form and after a certain event in the child I want close both the child and parent forms.
So I was trying to set the Parent for the child form.But this gives error.
How do I achieve this?
Thanks in Advance
Start Free Trial