You must Sign In to post a response.
  • Category: .NET

    Form that was specified to be the MdiParent for this form is not an MdiContainer. Parameter name: va

    my mdi panel error is came this is my code, any one give idea how to solve this error

    adminmdipanel adpanel = new adminmdipanel();
    adpanel.Show();


    usercreation uc = new usercreation();
    uc.find.Visible = false;


    uc.MdiParent = this;
    uc.Show();
    uc.Focus();
  • #765940
    Hi,
    1. try adding property IsMdiContainer = true; to your mdi Form_Load method.
    2. try adding property this.IsMdiContainer = true; inside designer.cs.

  • #765941
    Error is came

    Form that was specified to be the MdiParent for this form is not an MdiContainer.
    Parameter name: value

  • #765942
    Hi,
    1. Is adminmdipanel is your mdi parent form?
    2. Have you written below code in mdi parent form?
    usercreation uc = new usercreation();
    uc.find.Visible = false;
    uc.MdiParent = this;
    uc.Show();
    uc.Focus();

  • #765944
    This error occur when Mdi parent is not set to its IsMdiContainer, you need the The Mdi parent must have it's IsMdiContainer property set to True. You can set this property at design time in your frmMainPanel form.
    refer below snippet

    Frm1 objfrm = new Frm1();
    objfrm.MdiParent = this;
    objfrm .Show();
    objfrm .Focus();

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #765952
    In your code which part you are getting exception. Can you tell little bit clear

    adminmdipanel adpanel = new adminmdipanel(); // What is this for?
    adpanel.Show();
    usercreation uc = new usercreation();
    uc.find.Visible = false;
    uc.MdiParent = this; // What about the MDI form
    uc.Show();
    uc.Focus();

    In which line you are getting exception? What is the exception you are getting?

    By Nathan
    Direction is important than speed


  • Sign In to post your comments