0
If you have 3 forms to embed, then changing them to UserControls is probably the best solution.
However, for the record, you can embed a form (as such) by changing its TopLevel property to false before adding it to the container's Controls collection.
0
Yes that what i told bhaskar,
You windows form is dereivied from Form Class, Just change it to UserConrtrol..Thats it
Find attached zip for demo.
Your Response is important to use. Please Check This is Currect Answer, if it helped
0
when added like this the error is top level control cannot be added to a control exception occurs.and how to change windows forms to usercontrol
0
when added like this the error is top level control cannot be added to a control exception occurs.and how to change windows forms to usercontrol
0
Its simple just do a trick
every window form is derived from Form class, just change it UserControl, no need to change anything else.(do it for all three child forms)
and now u can simply do like follow.
tabControl1.TabPages[0].Controls.Add(new FrmStudent());
tabControl1.TabPages[1].Controls.Add(new FrmTeacher());
Hope It Helped. Please Check This is Currect Answer.