PDA

Click to See Complete Forum and Search --> : [RESOLVED] How to Change what a Childform has in it.


soultheift
Jul 20th, 2006, 07:40 PM
Hi im new to c# and i cant figure out how to change what appears in the new childform window that appears when u click the new button. th coding i have so far is

private void ShowNewForm(object sender, EventArgs e)
{
// Create a new instance of the child form.
Form childForm = new Form();
// Make it a child of this MDI form before showing it.
childForm.MdiParent = this;
childForm.Text = "Window " + childFormNumber++;
childForm.Show();
}

Hack
Jul 21st, 2006, 05:39 AM
Moved to C#

ComputerJy
Jul 21st, 2006, 07:03 AM
put:
this.IsMdiContainer=true;
in your Form_Load event handler

JPicasso
Jul 21st, 2006, 07:55 AM
Create a new form, say Form2.
build it up like you want it to look,
then instead of
Form childForm = new Form();
yours would read
Form childForm = new Form2();
might want to do something like
childForm.top=0;
childForm.left=0;