CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Posts
    26

    Problem with MDI Child forms

    I have opened an MDI Form and then added an MDI child form to it. I am calling the MDI child form from a menu item on MDI form. When I am doing this the child form is displaying in the middle of the screen. I want it to be attached to the MDI tool bar. What are the properties do i need to set to achieve the task.


    chakradhar





    Software Engineer
    IT Solutions India
    Banagalore

  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Problem with MDI Child forms

    I'm not sure what you mean by "attached to the menu", but you can code like this

    me.Move 0, 0



    in the Resize Event of your MDIChild to position your child right below the menu bar.


  3. #3
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Problem with MDI Child forms

    You can also set AutoShowChildern property of MDI Form to false. This will stop the child form from being shown when they are loaded. So after loading, set the Left and top in the MDI form's code itself. Something like this:

    Load frmChild1
    frmChild1.Move 0, 0
    frmChild1.Show


    "We cannot solve problems with the same thinking we used when we created them." - Einstein

  4. #4
    Join Date
    Aug 1999
    Posts
    5

    Re: Problem with MDI Child forms

    You have to set the Top Property of your MDI child
    form.By default MDI child form will be attached to the top portion(near Menu) of MDI form.
    If you have written some code to center the
    form then you have to reduce the Value in the Top
    property of the MDI child form in your code.





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

Featured