VB2008: WinForm as control in another form

  • Thread starter Thread starter Etienne-Louis Nicolet
  • Start date Start date
E

Etienne-Louis Nicolet

Is it possible to use a windows form as a control in another form? If so,
how?

Many thanks and kind regards,
Etienne
 
Is it possible to use a windows form as a control in another form? If so,
how?

Many thanks and kind regards,
Etienne

Yes, you can create MDI appcation to host child forms.

public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();

this.IsMdiContainer = true;
}


private void newToolStripMenuItem_Click(object sender,
EventArgs e)
{
Form2 mdiChildForm = new Form2();
mdiChildForm.MdiParent = this;
mdiChildForm.Show();
}
}
 
Back
Top