Results 1 to 3 of 3

Thread: [RESOLVED] MDI forms and toolstrips

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2003
    Posts
    683

    Resolved [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?

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2003
    Posts
    683

    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.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2003
    Posts
    683

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width