none
Why using childForm.MDIParent = this not show childForm

    Question

  • I use the following command but it does not run :
        childForm f=new childForm;
        f.MDIParent = this;
        f..show();

    If I omit the second command    f.MDIParent = this; It run normally
    I do not understand that because in .net 1.1 they are correct.

    Please tell me what the problem.

    Thanks in advance!
    Wednesday, January 24, 2007 4:31 AM

Answers

  • Hi for this we need to set parent form idMidContainer to true;

    then  

        childForm f=new childForm();
        f.MDIParent = this;
        f.show();

    I test it works well.

    hope it help you

    Wednesday, January 24, 2007 6:10 AM

All replies

  • Hi,

      what do you mean by "not run", are you getting  a compiler error, if so what is the exact error text you got?  If so did you make sure you set the IsMdiContainer property of you main for to true?

     

    Mark.

    Wednesday, January 24, 2007 5:02 AM
  • Hi for this we need to set parent form idMidContainer to true;

    then  

        childForm f=new childForm();
        f.MDIParent = this;
        f.show();

    I test it works well.

    hope it help you

    Wednesday, January 24, 2007 6:10 AM
  • Thanks for your reply.

    When I type :
    f.MDIParent = this;

    The children form is not shown although I set isMDIContainer property for Main Form.

    I do not know what happen.
    Could you give me the explanation for this.

    Thanks so much!
    Wednesday, January 24, 2007 7:09 AM
  • Hi,

      do you have a short but complete code example which demonstrates your problem,  setting IsMdiContainer on the parent form and setting the MDIChild property of child forms should work, an example in code would help pinpoint the problem you are having.

     

    Mark.

    Wednesday, January 24, 2007 7:45 AM
  • But I can not find MDIChildren property of childform at Design Time.

    How can I do that.
    Wednesday, January 24, 2007 9:49 AM
  • Hi Pvphuc:

         I think nornally we just set childform.MdiParent =parentform; it would works.

          would you please post all your code and error you meet? because, maybe all of us haven't catch your means, and all things seems works ok on my PC.

    Best Regards!

    Friday, January 26, 2007 2:17 AM
  • Thanks for your time.

    I found the answer. Child form does not display because I put a SpliterContainer on main form.
    Sorry for this.



    Friday, January 26, 2007 7:18 AM