I have a Parent form and i like to open a child form within the the parent form.
Can this be done? If yes please reply me with sample code .
Thanks !
See Question&Answers more detail:osI have a Parent form and i like to open a child form within the the parent form.
Can this be done? If yes please reply me with sample code .
Thanks !
See Question&Answers more detail:osFollowing is the code to do what you want:
Assume that button1 is in the parent form.
private void button1_Click(object sender, EventArgs e)
{
this.IsMdiContainer = true;
Form Form2 = new Form();
Form2.MdiParent = this;
Form2.Show();
}
Also the following link will provide you more better details of what you want to do:
http://www.codeproject.com/KB/cs/mdiformstutorial.aspx
Hope this helps...