[RESOLVED] MDI forms and toolstrips
I have a MDI main form with a toolstrip. I open forms within it with code like this:
Code:
// Create a new instance of the child form.
AboutBox1 childForm = new AboutBox1();
// Make it a child of this MDI form before showing it.
childForm.MdiParent = this;
childForm.Text = "About Document Control";
childForm.Show();
and this form will stay within the confinds of the main form and toolstrip.
When I have a button on that form to open another form, I have been using this code:
Code:
frmAllCourseDocs frmAll = new frmAllCourseDocs();
frmAll.TopLevel = false;
frmAll.Location = new Point(0,56);
frmAll.Parent = this.MdiParent;
frmAll.Show();
However, when this form starts up it will over lap the toolstrip which I don't want. I want to have it within the confinds just like the first form that opened. It open happens when I open a form within a form. Any ideas?
Re: MDI forms and toolstrips
Another problem I am now noticing is that the forms that are opened from another child form will not tile or cascade as the others do. They do not move at all. Help Please.
Re: MDI forms and toolstrips
It seems all I had to do was change the code to this:
frmAllCourseDocs frmAll = new frmAllCourseDocs ();
// Make it a child of this MDI form before showing it.
frmAll .MdiParent = this.MdiParent;
frmAll .Text = "About Document Control";
frmAll .Show();