VB2008: WinForm as control in another form

  • Thread starter Etienne-Louis Nicolet
  • 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
 
H

hack2root

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();
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top