Results 1 to 4 of 4

Thread: How to open a new form inside an existing?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602

    How to open a new form inside an existing?

    This is probably very simple, but Im originally an asp.net programmer, and now I need to make a small windows app.

    I have 4 winforms in a project.

    On the fifth winform I have a menu where it is possible to select which window I want to show... I have have all four windows open at the same time... but how do I contain them within the "main" form? And how is the best way to write when to show-hide them?

    Kind regards
    henrik

  2. #2
    Junior Member
    Join Date
    Mar 2004
    Location
    Netherlands
    Posts
    27
    I think you can set your main form as a parent form and your others as a child... I haven't tried this myself, but that's what I reckon. Otherwise you can play around with the Location method.

    I hope it helps...
    *(^.^); c(_)

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    I have looked everywhere but haven't found a way to se this... but that is exactly what I want to do... specify the other windows as childs...



    I have another question though.

    Is there a way in the setup&deployment project to check if the .net framework is installed? I know about the "search target machine" feature, but what should I look for to be sure?

    And which is the best way to then install the framwork? I don't want to distribute it with the application pack. Can I add a link to a download site? Or just a simple message saying.. please install the .net framwork from download.microsoft.com, click here to end the instalation


    Kind regards
    henrik

  4. #4
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi,

    You can set the main form IsMdiContainer property to true at any time. You can then set the MdiParent property of the form you wish to display to True and set it to False when you are finished with it.

    e.g.
    VB Code:
    1. Me.IsMdiContainer = True
    2.         frmCurrent.MdiParent = Me"

    You can, of course, set the MdiParent property of several forms(Unless their IsMdiParent property is set to True) but all child forms will automatically appear unless you set it's Visible property to False. By doing this, of course, you do discolour the original main form.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

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