Results 1 to 2 of 2

Thread: making form a child

  1. #1

    Thread Starter
    Lively Member ayan's Avatar
    Join Date
    Jan 2004
    Posts
    112

    making form a child

    hello...

    i have a problem dealing with the called form to be a child of the base... i don't know if i explained it correctly but this is what i want to happen...

    there are three forms... frmmain, frmitem, frmitemquery...
    frmmain is the parent and let's say it calls frmitem, making that a child. what i don't know is that, frmitem calls frmitemquery and making it a child of frmmain...

    something like this...

    on frmmain:
    Code:
    Form f=new frmitem();
    f.Show();
    f.MdiParent=this;
    on frmitem:
    Code:
    Form f=new frmitemquery();
    f.Show();
    // there should be something here to make 
    //the frmitemquery a child of frmmain
    thanx very much...

  2. #2
    Junior Member
    Join Date
    Nov 2002
    Location
    New York
    Posts
    29

    Re: making form a child

    like this:

    on frmitem:
    Code:
    Form f=new frmitemquery();
    Form mainform = this.Parent;
    mainForm.AddOwnedForm(f);
    f.Show();

    Regards,
    Iulian
    --------------------------------------------------------
    Help beta-test PlusSuite .Net Control Library
    at http://www.olvio.com
    --------------------------------------------------------


    [QUOTE]Originally posted by ayan
    [B]hello...

    on frmitem:
    Code:
    Form f=new frmitemquery();
    f.Show();
    // there should be something here to make 
    //the frmitemquery a child of frmmain
    http://www.olvio.com/ www.olvio.com

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