|
-
Jul 20th, 2006, 07:40 PM
#1
Thread Starter
New Member
[RESOLVED] How to Change what a Childform has in it.
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();
}
-
Jul 21st, 2006, 05:39 AM
#2
Re: How to Change what a Childform has in it.
-
Jul 21st, 2006, 07:03 AM
#3
Re: How to Change what a Childform has in it.
put:
Code:
this.IsMdiContainer=true;
in your Form_Load event handler
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Jul 21st, 2006, 07:55 AM
#4
Fanatic Member
Re: How to Change what a Childform has in it.
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;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|