Opening Forms inside another form

Hi,

Is it possible to open a form inside another form Can it be opened in a panel My application should not open more then one form.

Thanks,

Rafael Sancho


Answer this question

Opening Forms inside another form

  • mindscratch

    Hello Richard

    I'm new to dot net but have worked with VB6 a long time.

    The question I have is I'm trying to work with controls on a child form.

    I'm using a MDI parent form and a child form with a textbox on it.

    In the parent class I have done this.

    Formchild F_child = new Formchild();

    But with this I can not use F_child “dot” and get access to the textbox control.

    So I know that I'm not doing this right.

    Any help would grate.

    Also I would like to see the code that you talked about but can not find it on the link site.

    How do I contact you

    Tom


  • Thomas.Goddard

    Definitely it's possible.  I do it all the time.

    I recently gave a talk on how to do it for a programmer's group.  The sample code (both VB and C#) was going to be posted on their website: www.dotnetgroup.org.  If the samples hasn't been posted yet, if provide me with an email address and I can send them to you.  BTW, the samples were done in VS2005 Beta 2.

    Richard

  • simpleText

    I'll try that. Does it work with smart devices   I forgot to say that the app if for Pocket Pc.

    Thanks,

    Rafael


  • M. Whitener

    Are you talking about MDI forms

    (Multiple Documents Interface)

    Similar to Microsoft Excel with various spreadsheets inside a form

    If so... the main form should be the MDI container and the other forms should be mdi_child = true

    Or something to that effect... (i'm just rattling this off from memory as its been a long day and dont really want to have to look it up)

    Basically that should get you started and on your way....

    Regards

    Xander

  • DaveBrown1975

    All the controls are private to the form.

    You can write your own properties to access them if thats what you want to do.

    i.e something like

    Public string TextBoxXValue
    {
    get{return txtBoxX.Text;}
    set{txtBoxX.Text=value;}
    }

    then

    F_child.TextBoxXValue="hello";

    etc



  • Opening Forms inside another form