VB.Net - Menu process

Posted on 2005-04-29
Last Modified: 2012-08-13
New to VB.Net but know VB6.

The question is the following.....

I want a MDI Form with menu options on it. When you select a menu option a form will appear e.g. Employer Form.

In VB6 it was just a case of adding >>>>  form.Show in the click event of say the mnuEmployerForm

I must be doing something else but I cannot get this in VB.Net. Any ideas where I am going wrong and could you recommend a good sample code site as I feel I am getting lost and need some examples to get started.

Question by:directred
    LVL 8

    Expert Comment

    Hi direct,

    I know exactly how you feel! I had the same problem about 2 yrs ago when moving from VB6 to .NET

    The syntax is a bit different in VB.NET, as you have to declare the form you wish to show as a new form object, and then call the show() method on that object, eg:

    Dim frmNewChild as New frmEmplyerForm ' <-- the name of the form object you want to show

    Before calling Show() you may need to add the form to the controls collection of your parent form, so that it appears as an MDI child.

    Let me know if you need further help.


    LVL 8

    Accepted Solution

    A quick search in Google found me this link, which contains all the info you need for creating MDI apps:

    Author Comment

    Just a follow onto this. I am still getting a little bit mixed up with the controls collection of the parent form etc. Where do you also put frmNewChild.Show()?

    It is that Friday feeling and trying this all day never helped.

    If it is not too much bother, what would the code be like.

    Thanks in advance

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Suggested Solutions

    Title # Comments Views Activity
    Help with my python script 6 135
    Adobe Customization Wizard XI issues 26 133
    ShiftLeft challenge 21 50
    noX challenge 17 53
    I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now