Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_windows_forms thread: MDI Forms


Message #1 by "New Coder" <newcoder@h...> on Thu, 16 Jan 2003 19:00:59
Hi.  I have a simple MDI application consisting of a Parent form with a 
panel and a button.  Upon clicking the parent button, it displays the 
child form which has a panel and a button.  Upon clicking the child 
button, it's supposed to redisplay the parent panel & button but it 
doesn't.  All I get is a blank screen.  My code is simple:

Parent:

private void Parent_Click(object sender, System.EventArgs e)
{
	Company CoForm= new Company();
	CoForm.MdiParent= this;	
	this.MainPanel.SendToBack();
	CoForm.BringToFront();
	CoForm.Show();			
	Application.DoEvents();
}

Child:

private void Child_Click(object sender, System.EventArgs e)
{
	this.SendToBack();
	this.MdiParent.Show();
	this.Dispose();
}

All I get is a blank window and my parent panel & button don't show upon 
the Child_Click event.  How do I make my Parent panel & button show up 
again when I exit the child form???

Thanks!!!

  Return to Index