Results 1 to 2 of 2

Thread: Displaying a form inside a panel[Resolved]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    San Diego - California
    Posts
    251

    Displaying a form inside a panel[Resolved]

    In vb6 I used the setparent API to display a form inside a picturebox.

    In .net this can simply be acheived by using the containor property. I remember struggling to find the answer and when I did I was amazed how simple it was.

    The problem is that I forgotten how to do it.

    Can anyone help?
    Last edited by BryanJ; Jul 8th, 2003 at 10:44 AM.
    Control Data Systems
    www.members.shaw.ca/cdsystems

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    San Diego - California
    Posts
    251
    I remember now...

    private void button1_Click(object sender, System.EventArgs e)
    {
    Form frm = new frm_Tasks(); //Create an instant of the form
    frm.TopLevel = false;
    frm.Parent = pnl_main;
    frm.Show(); //Display the form
    }


    Please do not forget this again. As you will definitely need it!!!!
    Control Data Systems
    www.members.shaw.ca/cdsystems

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