main menu disappearred

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • GS

    #1

    main menu disappearred

    the main menu in the application seemed to disappeared all together until I
    click on an control and select mainmenu1 in designer. then the mainmenu1
    displays where it should be but running it or deselecting the mainmenu1, the
    menu disappears again.


    what can I do. to fix the problem


  • Ryan S. Thiele

    #2
    Re: main menu disappearred

    Explain a little bit please, are you running/debugging? Are you designing?

    --
    Thiele Enterprises - The Power Is In Your Hands Now!

    Comment

    • gs

      #3
      Re: main menu disappearred

      thanks
      both.
      1
      in design mode, the main menu does not show up. Unless I click on any
      control to select property,, and then scroll to Mainmenu1, I will then see
      the main menu. if the current control is no men menu, I will not see main
      menu in designer.

      2. when running, no main menu either

      "Ryan S. Thiele" <maligui@verizo n.netwrote in message
      news:8vBZg.5891 $IW6.4606@trndn y01...
      Explain a little bit please, are you running/debugging? Are you designing?
      >
      --
      Thiele Enterprises - The Power Is In Your Hands Now!

      Comment

      • Ryan S. Thiele

        #4
        Re: main menu disappearred

        Have you restarted VS? Or, your computer?
        Have you tried creating a new form and placing a main menu on that?
        Sometimes VS has hicups when your program gets big.
        Do you use VS2003 or VS 2005?

        --
        Thiele Enterprises - The Power Is In Your Hands Now!

        Comment

        • Norman Chong

          #5
          Re: main menu disappearred


          gs schrieb:
          thanks
          both.
          1
          in design mode, the main menu does not show up. Unless I click on any
          control to select property,, and then scroll to Mainmenu1, I will then see
          the main menu. if the current control is no men menu, I will not see main
          menu in designer.
          >
          2. when running, no main menu either
          >
          Is it possible that you accidentally "hide" your Mainmenu behind some
          other Controls or Containers (A Panel, GroupBox or whatever)?
          Stupid question, I know - But this was the only way for me to create
          this problem...

          Comment

          • gs

            #6
            Re: main menu disappearred


            "Ryan S. Thiele" <maligui@verizo n.netwrote in message
            news:61CZg.5448 $5v5.2421@trndn y08...
            Have you restarted VS? Or, your computer?
            Yes both
            Have you tried creating a new form and placing a main menu on that?
            in the same project or different project?
            Sometimes VS has hicups when your program gets big.
            is 107kb big? I have 2 GB of ram. about 850GB of commit/charge useage
            between VS2005 express and a running virtual PC
            I even trying running VS only after reboot still messed up the main menu. I
            guess there is no way it will let me add nother main menu on other form in
            teh project. it is possible to add a menu strip to another form
            Do you use VS2003 or VS 2005?
            Microsoft Visual Studio 2005
            Version 8.0.50727.42 (RTM.050727-4200)
            Microsoft .NET Framework
            Version 2.0.50727

            Installed Edition: VB Express

            Microsoft Visual Basic 2005 76541-000-0000011-.....
            Microsoft Visual Basic 2005

            Hmmm, actually I don't see any way to add mainmenu through the designer. no
            mainmenu but "menu" in the toolbox.


            If I start up a new prject, I don't see main menu either even in code as
            system.windows. form..mainmenu

            I believe there was an dotnet update not too long ago
            >
            --
            Thiele Enterprises - The Power Is In Your Hands Now!

            Comment

            • gs

              #7
              Re: main menu disappearred

              thank you for your patience.

              I thought about this. but if hidden then only behind the form. I was
              looking at the attribute to bring forward but failed.

              when I don't see the main menu in designer, click on he spot where the main
              menu should be and select property, I got the main form shown in the
              property box.

              So, how do I unhide the main menu?



              "Norman Chong" <normanchong@fr eenet.dewrote in message
              news:1161238925 .443548.108790@ b28g2000cwb.goo glegroups.com.. .
              >
              gs schrieb:
              >
              >thanks
              >both.
              >1
              >in design mode, the main menu does not show up. Unless I click on any
              >control to select property,, and then scroll to Mainmenu1, I will then
              >see
              >the main menu. if the current control is no men menu, I will not see main
              >menu in designer.
              >>
              >2. when running, no main menu either
              >>
              >
              Is it possible that you accidentally "hide" your Mainmenu behind some
              other Controls or Containers (A Panel, GroupBox or whatever)?
              Stupid question, I know - But this was the only way for me to create
              this problem...
              >

              Comment

              • gs

                #8
                Re: main menu disappearred

                oh, btw, I went to code and extract the code for mainenu


                'Required by the Windows Form Designer

                Private components As System.Componen t.IContainer

                'NOTE: The following procedure is required by the Windows Form Designer

                'It can be modified using the Windows Form Designer.

                'Do not modify it using the code editor.

                Friend WithEvents MainMenu1 As System.Windows. Forms.MainMenu

                ....


                <System.Diagnos tics.DebuggerSt epThrough()Priv ate Sub InitializeCompo nent()

                Me.components = New System.Componen tModel.Containe r

                Dim resources As System.Componen tModel.Componen tResourceManage r = New
                System.Componen tModel.Componen tResourceManage r(GetType(FormM yApp))

                Me.MainMenu1 = New System.Windows. Forms.MainMenu( Me.components)

                Me.fileMI = New System.Windows. Forms.MenuItem

                Me.openMI = New System.Windows. Forms.MenuItem

                Me.printMI = New System.Windows. Forms.MenuItem

                Me.MenuItem6 = New System.Windows. Forms.MenuItem

                Me.exitMI = New System.Windows. Forms.MenuItem

                Me.editMI = New System.Windows. Forms.MenuItem

                Me.cutMI = New System.Windows. Forms.MenuItem

                Me.copyMI = New System.Windows. Forms.MenuItem

                Me.pasteMI = New System.Windows. Forms.MenuItem

                Me.MenuItem12 = New System.Windows. Forms.MenuItem

                Me.findMI = New System.Windows. Forms.MenuItem

                Me.viewSourceMI = New System.Windows. Forms.MenuItem

                Me.toolsMI = New System.Windows. Forms.MenuItem

                Me.internetOpti onsMI = New System.Windows. Forms.MenuItem

                Me.helpMI = New System.Windows. Forms.MenuItem

                Me.aboutMI = New System.Windows. Forms.MenuItem

                Me.contextMenu = New System.Windows. Forms.ContextMe nu

                ....

                'MainMenu1

                '

                Me.MainMenu1.Me nuItems.AddRang e(New System.Windows. Forms.MenuItem( )
                {Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI, Me.helpMI})

                '

                'fileMI

                '

                Me.fileMI.Index = 0

                Me.fileMI.MenuI tems.AddRange(N ew System.Windows. Forms.MenuItem( ) {Me.openMI,
                Me.printMI, Me.MenuItem6, Me.exitMI})

                Me.fileMI.Text = "File"

                '

                'openMI

                '

                Me.openMI.Index = 0

                Me.openMI.Text = "&Open..."

                '

                'printMI

                '

                Me.printMI.Inde x = 1

                Me.printMI.Text = "&Print..."

                .......

                "Norman Chong" <normanchong@fr eenet.dewrote in message
                news:1161238925 .443548.108790@ b28g2000cwb.goo glegroups.com.. .
                >
                gs schrieb:
                >
                >thanks
                >both.
                >1
                >in design mode, the main menu does not show up. Unless I click on any
                >control to select property,, and then scroll to Mainmenu1, I will then
                >see
                >the main menu. if the current control is no men menu, I will not see main
                >menu in designer.
                >>
                >2. when running, no main menu either
                >>
                >
                Is it possible that you accidentally "hide" your Mainmenu behind some
                other Controls or Containers (A Panel, GroupBox or whatever)?
                Stupid question, I know - But this was the only way for me to create
                this problem...
                >

                Comment

                • Ryan S. Thiele

                  #9
                  Re: main menu disappearred

                  it looks as if the menu is not included in the controlcollecit on.

                  Find a line the says something close to:

                  MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl})

                  If your menu is not listed in the control collection, add it manually.

                  MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl,
                  MyMenuControl})


                  See if this helps....

                  --
                  Thiele Enterprises - The Power Is In Your Hands Now!
                  "gs" <gs@dontMail.te luswrote in message
                  news:O2r1uE68GH A.2268@TK2MSFTN GP05.phx.gbl...
                  oh, btw, I went to code and extract the code for mainenu
                  >
                  >
                  'Required by the Windows Form Designer
                  >
                  Private components As System.Componen t.IContainer
                  >
                  'NOTE: The following procedure is required by the Windows Form Designer
                  >
                  'It can be modified using the Windows Form Designer.
                  >
                  'Do not modify it using the code editor.
                  >
                  Friend WithEvents MainMenu1 As System.Windows. Forms.MainMenu
                  >
                  ...
                  >
                  >
                  <System.Diagnos tics.DebuggerSt epThrough()Priv ate Sub
                  InitializeCompo nent()
                  >
                  Me.components = New System.Componen tModel.Containe r
                  >
                  Dim resources As System.Componen tModel.Componen tResourceManage r = New
                  System.Componen tModel.Componen tResourceManage r(GetType(FormM yApp))
                  >
                  Me.MainMenu1 = New System.Windows. Forms.MainMenu( Me.components)
                  >
                  Me.fileMI = New System.Windows. Forms.MenuItem
                  >
                  Me.openMI = New System.Windows. Forms.MenuItem
                  >
                  Me.printMI = New System.Windows. Forms.MenuItem
                  >
                  Me.MenuItem6 = New System.Windows. Forms.MenuItem
                  >
                  Me.exitMI = New System.Windows. Forms.MenuItem
                  >
                  Me.editMI = New System.Windows. Forms.MenuItem
                  >
                  Me.cutMI = New System.Windows. Forms.MenuItem
                  >
                  Me.copyMI = New System.Windows. Forms.MenuItem
                  >
                  Me.pasteMI = New System.Windows. Forms.MenuItem
                  >
                  Me.MenuItem12 = New System.Windows. Forms.MenuItem
                  >
                  Me.findMI = New System.Windows. Forms.MenuItem
                  >
                  Me.viewSourceMI = New System.Windows. Forms.MenuItem
                  >
                  Me.toolsMI = New System.Windows. Forms.MenuItem
                  >
                  Me.internetOpti onsMI = New System.Windows. Forms.MenuItem
                  >
                  Me.helpMI = New System.Windows. Forms.MenuItem
                  >
                  Me.aboutMI = New System.Windows. Forms.MenuItem
                  >
                  Me.contextMenu = New System.Windows. Forms.ContextMe nu
                  >
                  ...
                  >
                  'MainMenu1
                  >
                  '
                  >
                  Me.MainMenu1.Me nuItems.AddRang e(New System.Windows. Forms.MenuItem( )
                  {Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI, Me.helpMI})
                  >
                  '
                  >
                  'fileMI
                  >
                  '
                  >
                  Me.fileMI.Index = 0
                  >
                  Me.fileMI.MenuI tems.AddRange(N ew System.Windows. Forms.MenuItem( )
                  {Me.openMI, Me.printMI, Me.MenuItem6, Me.exitMI})
                  >
                  Me.fileMI.Text = "File"
                  >
                  '
                  >
                  'openMI
                  >
                  '
                  >
                  Me.openMI.Index = 0
                  >
                  Me.openMI.Text = "&Open..."
                  >
                  '
                  >
                  'printMI
                  >
                  '
                  >
                  Me.printMI.Inde x = 1
                  >
                  Me.printMI.Text = "&Print..."
                  >
                  ......
                  >
                  "Norman Chong" <normanchong@fr eenet.dewrote in message
                  news:1161238925 .443548.108790@ b28g2000cwb.goo glegroups.com.. .
                  >
                  >>
                  >gs schrieb:
                  >>
                  >>thanks
                  >>both.
                  >>1
                  >>in design mode, the main menu does not show up. Unless I click on any
                  >>control to select property,, and then scroll to Mainmenu1, I will then
                  >>see
                  >>the main menu. if the current control is no men menu, I will not see
                  >>main
                  >>menu in designer.
                  >>>
                  >>2. when running, no main menu either
                  >>>
                  >>
                  >Is it possible that you accidentally "hide" your Mainmenu behind some
                  >other Controls or Containers (A Panel, GroupBox or whatever)?
                  >Stupid question, I know - But this was the only way for me to create
                  >this problem...
                  >>
                  >
                  >

                  Comment

                  • GS

                    #10
                    Re: main menu disappearred

                    Thank you.

                    unfortunately Me.Controls.Add Range(MainMenu1 )
                    leads to error:
                    Error 1 Value of type 'System.Windows .Forms.MainMenu ' cannot be converted to
                    '1-dimensional array of System.Windows. Forms.Control'. ...myform.vb 1284 30
                    myform

                    actually there is no prior me.control.addr ange but quite a number of
                    me.controls.add (...)
                    none for me.mainmenu1
                    if I use add instead of addrange
                    Me.Controls.Add (MainMenu1)
                    I get similar message like using addrange.

                    btw, I am using visual basic .net 2005 express with latest update. the
                    project initially upgraded an webICHpstCtrl demo project from prior version
                    (.net 1?). The main menu was visible both in designer and in run time. I
                    had ripped out the ole webbrowser component and replaced with an more .net
                    interface webbrowser.
                    There was and there still is not separate designer file for myform.



                    If I create a new project, I will not see any guid component the main code
                    file but see the in the designer file. that is I end up with 2 partial
                    classes

                    "Ryan S. Thiele" <maligui@verizo n.netwrote in message
                    news:UzWZg.7064 $Z46.4151@trndn y05...
                    it looks as if the menu is not included in the controlcollecit on.
                    >
                    Find a line the says something close to:
                    >
                    MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl})
                    >
                    If your menu is not listed in the control collection, add it manually.
                    >
                    MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl,
                    MyMenuControl})
                    >
                    >
                    See if this helps....
                    >
                    --
                    Thiele Enterprises - The Power Is In Your Hands Now!
                    "gs" <gs@dontMail.te luswrote in message
                    news:O2r1uE68GH A.2268@TK2MSFTN GP05.phx.gbl...
                    oh, btw, I went to code and extract the code for mainenu


                    'Required by the Windows Form Designer

                    Private components As System.Componen t.IContainer

                    'NOTE: The following procedure is required by the Windows Form Designer

                    'It can be modified using the Windows Form Designer.

                    'Do not modify it using the code editor.

                    Friend WithEvents MainMenu1 As System.Windows. Forms.MainMenu

                    ...


                    <System.Diagnos tics.DebuggerSt epThrough()Priv ate Sub
                    InitializeCompo nent()

                    Me.components = New System.Componen tModel.Containe r

                    Dim resources As System.Componen tModel.Componen tResourceManage r = New
                    System.Componen tModel.Componen tResourceManage r(GetType(FormM yApp))

                    Me.MainMenu1 = New System.Windows. Forms.MainMenu( Me.components)

                    Me.fileMI = New System.Windows. Forms.MenuItem

                    Me.openMI = New System.Windows. Forms.MenuItem

                    Me.printMI = New System.Windows. Forms.MenuItem

                    Me.MenuItem6 = New System.Windows. Forms.MenuItem

                    Me.exitMI = New System.Windows. Forms.MenuItem

                    Me.editMI = New System.Windows. Forms.MenuItem

                    Me.cutMI = New System.Windows. Forms.MenuItem

                    Me.copyMI = New System.Windows. Forms.MenuItem

                    Me.pasteMI = New System.Windows. Forms.MenuItem

                    Me.MenuItem12 = New System.Windows. Forms.MenuItem

                    Me.findMI = New System.Windows. Forms.MenuItem

                    Me.viewSourceMI = New System.Windows. Forms.MenuItem

                    Me.toolsMI = New System.Windows. Forms.MenuItem

                    Me.internetOpti onsMI = New System.Windows. Forms.MenuItem

                    Me.helpMI = New System.Windows. Forms.MenuItem

                    Me.aboutMI = New System.Windows. Forms.MenuItem

                    Me.contextMenu = New System.Windows. Forms.ContextMe nu

                    ...

                    'MainMenu1

                    '

                    Me.MainMenu1.Me nuItems.AddRang e(New System.Windows. Forms.MenuItem( )
                    {Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
                    Me.helpMI})

                    '

                    'fileMI

                    '

                    Me.fileMI.Index = 0

                    Me.fileMI.MenuI tems.AddRange(N ew System.Windows. Forms.MenuItem( )
                    {Me.openMI, Me.printMI, Me.MenuItem6, Me.exitMI})

                    Me.fileMI.Text = "File"

                    '

                    'openMI

                    '

                    Me.openMI.Index = 0

                    Me.openMI.Text = "&Open..."

                    '

                    'printMI

                    '

                    Me.printMI.Inde x = 1

                    Me.printMI.Text = "&Print..."

                    ......

                    "Norman Chong" <normanchong@fr eenet.dewrote in message
                    news:1161238925 .443548.108790@ b28g2000cwb.goo glegroups.com.. .
                    >
                    gs schrieb:
                    >
                    >thanks
                    >both.
                    >1
                    >in design mode, the main menu does not show up. Unless I click on any
                    >control to select property,, and then scroll to Mainmenu1, I will then
                    >see
                    >the main menu. if the current control is no men menu, I will not see
                    >main
                    >menu in designer.
                    >>
                    >2. when running, no main menu either
                    >>
                    >
                    Is it possible that you accidentally "hide" your Mainmenu behind some
                    other Controls or Containers (A Panel, GroupBox or whatever)?
                    Stupid question, I know - But this was the only way for me to create
                    this problem...
                    >
                    >
                    >

                    Comment

                    • Ryan S. Thiele

                      #11
                      Re: main menu disappearred

                      to use the addrange method, you have to declare an instance.

                      Controls.AddRan ge(New MainMenu() {MainMenu1})

                      you can also use:

                      Controls.Add(Ma inMenu1)

                      --
                      Thiele Enterprises - The Power Is In Your Hands Now!

                      --
                      "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comwr ote in message
                      news:%23oq$qbA9 GHA.4712@TK2MSF TNGP03.phx.gbl. ..
                      Thank you.

                      unfortunately Me.Controls.Add Range(MainMenu1 )
                      leads to error:
                      Error 1 Value of type 'System.Windows .Forms.MainMenu ' cannot be converted to
                      '1-dimensional array of System.Windows. Forms.Control'. ...myform.vb 1284 30
                      myform

                      actually there is no prior me.control.addr ange but quite a number of
                      me.controls.add (...)
                      none for me.mainmenu1
                      if I use add instead of addrange
                      Me.Controls.Add (MainMenu1)
                      I get similar message like using addrange.

                      btw, I am using visual basic .net 2005 express with latest update. the
                      project initially upgraded an webICHpstCtrl demo project from prior version
                      (.net 1?). The main menu was visible both in designer and in run time. I
                      had ripped out the ole webbrowser component and replaced with an more .net
                      interface webbrowser.
                      There was and there still is not separate designer file for myform.



                      If I create a new project, I will not see any guid component the main code
                      file but see the in the designer file. that is I end up with 2 partial
                      classes

                      "Ryan S. Thiele" <maligui@verizo n.netwrote in message
                      news:UzWZg.7064 $Z46.4151@trndn y05...
                      it looks as if the menu is not included in the controlcollecit on.
                      >
                      Find a line the says something close to:
                      >
                      MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl})
                      >
                      If your menu is not listed in the control collection, add it manually.
                      >
                      MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl,
                      MyMenuControl})
                      >
                      >
                      See if this helps....
                      >
                      --
                      Thiele Enterprises - The Power Is In Your Hands Now!
                      "gs" <gs@dontMail.te luswrote in message
                      news:O2r1uE68GH A.2268@TK2MSFTN GP05.phx.gbl...
                      oh, btw, I went to code and extract the code for mainenu


                      'Required by the Windows Form Designer

                      Private components As System.Componen t.IContainer

                      'NOTE: The following procedure is required by the Windows Form Designer

                      'It can be modified using the Windows Form Designer.

                      'Do not modify it using the code editor.

                      Friend WithEvents MainMenu1 As System.Windows. Forms.MainMenu

                      ...


                      <System.Diagnos tics.DebuggerSt epThrough()Priv ate Sub
                      InitializeCompo nent()

                      Me.components = New System.Componen tModel.Containe r

                      Dim resources As System.Componen tModel.Componen tResourceManage r = New
                      System.Componen tModel.Componen tResourceManage r(GetType(FormM yApp))

                      Me.MainMenu1 = New System.Windows. Forms.MainMenu( Me.components)

                      Me.fileMI = New System.Windows. Forms.MenuItem

                      Me.openMI = New System.Windows. Forms.MenuItem

                      Me.printMI = New System.Windows. Forms.MenuItem

                      Me.MenuItem6 = New System.Windows. Forms.MenuItem

                      Me.exitMI = New System.Windows. Forms.MenuItem

                      Me.editMI = New System.Windows. Forms.MenuItem

                      Me.cutMI = New System.Windows. Forms.MenuItem

                      Me.copyMI = New System.Windows. Forms.MenuItem

                      Me.pasteMI = New System.Windows. Forms.MenuItem

                      Me.MenuItem12 = New System.Windows. Forms.MenuItem

                      Me.findMI = New System.Windows. Forms.MenuItem

                      Me.viewSourceMI = New System.Windows. Forms.MenuItem

                      Me.toolsMI = New System.Windows. Forms.MenuItem

                      Me.internetOpti onsMI = New System.Windows. Forms.MenuItem

                      Me.helpMI = New System.Windows. Forms.MenuItem

                      Me.aboutMI = New System.Windows. Forms.MenuItem

                      Me.contextMenu = New System.Windows. Forms.ContextMe nu

                      ...

                      'MainMenu1

                      '

                      Me.MainMenu1.Me nuItems.AddRang e(New System.Windows. Forms.MenuItem( )
                      {Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
                      Me.helpMI})

                      '

                      'fileMI

                      '

                      Me.fileMI.Index = 0

                      Me.fileMI.MenuI tems.AddRange(N ew System.Windows. Forms.MenuItem( )
                      {Me.openMI, Me.printMI, Me.MenuItem6, Me.exitMI})

                      Me.fileMI.Text = "File"

                      '

                      'openMI

                      '

                      Me.openMI.Index = 0

                      Me.openMI.Text = "&Open..."

                      '

                      'printMI

                      '

                      Me.printMI.Inde x = 1

                      Me.printMI.Text = "&Print..."

                      ......

                      "Norman Chong" <normanchong@fr eenet.dewrote in message
                      news:1161238925 .443548.108790@ b28g2000cwb.goo glegroups.com.. .
                      >
                      gs schrieb:
                      >
                      >thanks
                      >both.
                      >1
                      >in design mode, the main menu does not show up. Unless I click on any
                      >control to select property,, and then scroll to Mainmenu1, I will then
                      >see
                      >the main menu. if the current control is no men menu, I will not see
                      >main
                      >menu in designer.
                      >>
                      >2. when running, no main menu either
                      >>
                      >
                      Is it possible that you accidentally "hide" your Mainmenu behind some
                      other Controls or Containers (A Panel, GroupBox or whatever)?
                      Stupid question, I know - But this was the only way for me to create
                      this problem...
                      >
                      >
                      >


                      Comment

                      • Ryan S. Thiele

                        #12
                        Re: main menu disappearred

                        If you add more then one control you can use the addrange method, forgot to
                        add this...

                        Controls.Addran ge({Control1,Co ntrol2,etc})

                        Or you can add them one at a time.

                        Controls.Add(Co ntrol1)
                        Controls.Add(Co ntrol2)
                        etc...


                        --
                        Thiele Enterprises - The Power Is In Your Hands Now!

                        --
                        "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comwr ote in message
                        news:%23oq$qbA9 GHA.4712@TK2MSF TNGP03.phx.gbl. ..
                        Thank you.

                        unfortunately Me.Controls.Add Range(MainMenu1 )
                        leads to error:
                        Error 1 Value of type 'System.Windows .Forms.MainMenu ' cannot be converted to
                        '1-dimensional array of System.Windows. Forms.Control'. ...myform.vb 1284 30
                        myform

                        actually there is no prior me.control.addr ange but quite a number of
                        me.controls.add (...)
                        none for me.mainmenu1
                        if I use add instead of addrange
                        Me.Controls.Add (MainMenu1)
                        I get similar message like using addrange.

                        btw, I am using visual basic .net 2005 express with latest update. the
                        project initially upgraded an webICHpstCtrl demo project from prior version
                        (.net 1?). The main menu was visible both in designer and in run time. I
                        had ripped out the ole webbrowser component and replaced with an more .net
                        interface webbrowser.
                        There was and there still is not separate designer file for myform.



                        If I create a new project, I will not see any guid component the main code
                        file but see the in the designer file. that is I end up with 2 partial
                        classes

                        "Ryan S. Thiele" <maligui@verizo n.netwrote in message
                        news:UzWZg.7064 $Z46.4151@trndn y05...
                        it looks as if the menu is not included in the controlcollecit on.
                        >
                        Find a line the says something close to:
                        >
                        MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl})
                        >
                        If your menu is not listed in the control collection, add it manually.
                        >
                        MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl,
                        MyMenuControl})
                        >
                        >
                        See if this helps....
                        >
                        --
                        Thiele Enterprises - The Power Is In Your Hands Now!
                        "gs" <gs@dontMail.te luswrote in message
                        news:O2r1uE68GH A.2268@TK2MSFTN GP05.phx.gbl...
                        oh, btw, I went to code and extract the code for mainenu


                        'Required by the Windows Form Designer

                        Private components As System.Componen t.IContainer

                        'NOTE: The following procedure is required by the Windows Form Designer

                        'It can be modified using the Windows Form Designer.

                        'Do not modify it using the code editor.

                        Friend WithEvents MainMenu1 As System.Windows. Forms.MainMenu

                        ...


                        <System.Diagnos tics.DebuggerSt epThrough()Priv ate Sub
                        InitializeCompo nent()

                        Me.components = New System.Componen tModel.Containe r

                        Dim resources As System.Componen tModel.Componen tResourceManage r = New
                        System.Componen tModel.Componen tResourceManage r(GetType(FormM yApp))

                        Me.MainMenu1 = New System.Windows. Forms.MainMenu( Me.components)

                        Me.fileMI = New System.Windows. Forms.MenuItem

                        Me.openMI = New System.Windows. Forms.MenuItem

                        Me.printMI = New System.Windows. Forms.MenuItem

                        Me.MenuItem6 = New System.Windows. Forms.MenuItem

                        Me.exitMI = New System.Windows. Forms.MenuItem

                        Me.editMI = New System.Windows. Forms.MenuItem

                        Me.cutMI = New System.Windows. Forms.MenuItem

                        Me.copyMI = New System.Windows. Forms.MenuItem

                        Me.pasteMI = New System.Windows. Forms.MenuItem

                        Me.MenuItem12 = New System.Windows. Forms.MenuItem

                        Me.findMI = New System.Windows. Forms.MenuItem

                        Me.viewSourceMI = New System.Windows. Forms.MenuItem

                        Me.toolsMI = New System.Windows. Forms.MenuItem

                        Me.internetOpti onsMI = New System.Windows. Forms.MenuItem

                        Me.helpMI = New System.Windows. Forms.MenuItem

                        Me.aboutMI = New System.Windows. Forms.MenuItem

                        Me.contextMenu = New System.Windows. Forms.ContextMe nu

                        ...

                        'MainMenu1

                        '

                        Me.MainMenu1.Me nuItems.AddRang e(New System.Windows. Forms.MenuItem( )
                        {Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
                        Me.helpMI})

                        '

                        'fileMI

                        '

                        Me.fileMI.Index = 0

                        Me.fileMI.MenuI tems.AddRange(N ew System.Windows. Forms.MenuItem( )
                        {Me.openMI, Me.printMI, Me.MenuItem6, Me.exitMI})

                        Me.fileMI.Text = "File"

                        '

                        'openMI

                        '

                        Me.openMI.Index = 0

                        Me.openMI.Text = "&Open..."

                        '

                        'printMI

                        '

                        Me.printMI.Inde x = 1

                        Me.printMI.Text = "&Print..."

                        ......

                        "Norman Chong" <normanchong@fr eenet.dewrote in message
                        news:1161238925 .443548.108790@ b28g2000cwb.goo glegroups.com.. .
                        >
                        gs schrieb:
                        >
                        >thanks
                        >both.
                        >1
                        >in design mode, the main menu does not show up. Unless I click on any
                        >control to select property,, and then scroll to Mainmenu1, I will then
                        >see
                        >the main menu. if the current control is no men menu, I will not see
                        >main
                        >menu in designer.
                        >>
                        >2. when running, no main menu either
                        >>
                        >
                        Is it possible that you accidentally "hide" your Mainmenu behind some
                        other Controls or Containers (A Panel, GroupBox or whatever)?
                        Stupid question, I know - But this was the only way for me to create
                        this problem...
                        >
                        >
                        >


                        Comment

                        • GS

                          #13
                          Re: main menu disappearred

                          thank you your patience
                          however

                          Controls.Add(Ma inMenu1)
                          yields compiler error of
                          Error 1 Value of type 'System.Windows .Forms.MainMenu ' cannot be
                          converted to 'System.Windows .Forms.Control' .

                          "Ryan S. Thiele" <maligui@verizo n.netwrote in message
                          news:ybZZg.4621 $kG5.2814@trndn y07...
                          to use the addrange method, you have to declare an instance.
                          >
                          Controls.AddRan ge(New MainMenu() {MainMenu1})
                          >
                          you can also use:
                          >
                          Controls.Add(Ma inMenu1)
                          >
                          --
                          Thiele Enterprises - The Power Is In Your Hands Now!
                          >
                          --
                          "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comwr ote in message
                          news:%23oq$qbA9 GHA.4712@TK2MSF TNGP03.phx.gbl. ..
                          Thank you.
                          >
                          unfortunately Me.Controls.Add Range(MainMenu1 )
                          leads to error:
                          Error 1 Value of type 'System.Windows .Forms.MainMenu ' cannot be converted
                          to
                          '1-dimensional array of System.Windows. Forms.Control'. ...myform.vb 1284
                          30
                          myform
                          >
                          actually there is no prior me.control.addr ange but quite a number of
                          me.controls.add (...)
                          none for me.mainmenu1
                          if I use add instead of addrange
                          Me.Controls.Add (MainMenu1)
                          I get similar message like using addrange.
                          >
                          btw, I am using visual basic .net 2005 express with latest update. the
                          project initially upgraded an webICHpstCtrl demo project from prior
                          version
                          (.net 1?). The main menu was visible both in designer and in run time. I
                          had ripped out the ole webbrowser component and replaced with an more
                          ..net
                          interface webbrowser.
                          There was and there still is not separate designer file for myform.
                          >
                          >
                          >
                          If I create a new project, I will not see any guid component the main code
                          file but see the in the designer file. that is I end up with 2 partial
                          classes
                          >
                          "Ryan S. Thiele" <maligui@verizo n.netwrote in message
                          news:UzWZg.7064 $Z46.4151@trndn y05...
                          it looks as if the menu is not included in the controlcollecit on.

                          Find a line the says something close to:

                          MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl})

                          If your menu is not listed in the control collection, add it manually.

                          MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl,
                          MyMenuControl})


                          See if this helps....

                          --
                          Thiele Enterprises - The Power Is In Your Hands Now!
                          "gs" <gs@dontMail.te luswrote in message
                          news:O2r1uE68GH A.2268@TK2MSFTN GP05.phx.gbl...
                          oh, btw, I went to code and extract the code for mainenu
                          >
                          >
                          'Required by the Windows Form Designer
                          >
                          Private components As System.Componen t.IContainer
                          >
                          'NOTE: The following procedure is required by the Windows Form
                          Designer
                          >
                          'It can be modified using the Windows Form Designer.
                          >
                          'Do not modify it using the code editor.
                          >
                          Friend WithEvents MainMenu1 As System.Windows. Forms.MainMenu
                          >
                          ...
                          >
                          >
                          <System.Diagnos tics.DebuggerSt epThrough()Priv ate Sub
                          InitializeCompo nent()
                          >
                          Me.components = New System.Componen tModel.Containe r
                          >
                          Dim resources As System.Componen tModel.Componen tResourceManage r = New
                          System.Componen tModel.Componen tResourceManage r(GetType(FormM yApp))
                          >
                          Me.MainMenu1 = New System.Windows. Forms.MainMenu( Me.components)
                          >
                          Me.fileMI = New System.Windows. Forms.MenuItem
                          >
                          Me.openMI = New System.Windows. Forms.MenuItem
                          >
                          Me.printMI = New System.Windows. Forms.MenuItem
                          >
                          Me.MenuItem6 = New System.Windows. Forms.MenuItem
                          >
                          Me.exitMI = New System.Windows. Forms.MenuItem
                          >
                          Me.editMI = New System.Windows. Forms.MenuItem
                          >
                          Me.cutMI = New System.Windows. Forms.MenuItem
                          >
                          Me.copyMI = New System.Windows. Forms.MenuItem
                          >
                          Me.pasteMI = New System.Windows. Forms.MenuItem
                          >
                          Me.MenuItem12 = New System.Windows. Forms.MenuItem
                          >
                          Me.findMI = New System.Windows. Forms.MenuItem
                          >
                          Me.viewSourceMI = New System.Windows. Forms.MenuItem
                          >
                          Me.toolsMI = New System.Windows. Forms.MenuItem
                          >
                          Me.internetOpti onsMI = New System.Windows. Forms.MenuItem
                          >
                          Me.helpMI = New System.Windows. Forms.MenuItem
                          >
                          Me.aboutMI = New System.Windows. Forms.MenuItem
                          >
                          Me.contextMenu = New System.Windows. Forms.ContextMe nu
                          >
                          ...
                          >
                          'MainMenu1
                          >
                          '
                          >
                          Me.MainMenu1.Me nuItems.AddRang e(New System.Windows. Forms.MenuItem( )
                          {Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
                          Me.helpMI})
                          >
                          '
                          >
                          'fileMI
                          >
                          '
                          >
                          Me.fileMI.Index = 0
                          >
                          Me.fileMI.MenuI tems.AddRange(N ew System.Windows. Forms.MenuItem( )
                          {Me.openMI, Me.printMI, Me.MenuItem6, Me.exitMI})
                          >
                          Me.fileMI.Text = "File"
                          >
                          '
                          >
                          'openMI
                          >
                          '
                          >
                          Me.openMI.Index = 0
                          >
                          Me.openMI.Text = "&Open..."
                          >
                          '
                          >
                          'printMI
                          >
                          '
                          >
                          Me.printMI.Inde x = 1
                          >
                          Me.printMI.Text = "&Print..."
                          >
                          ......
                          >
                          "Norman Chong" <normanchong@fr eenet.dewrote in message
                          news:1161238925 .443548.108790@ b28g2000cwb.goo glegroups.com.. .
                          >
                          >>
                          >gs schrieb:
                          >>
                          >>thanks
                          >>both.
                          >>1
                          >>in design mode, the main menu does not show up. Unless I click on
                          any
                          >>control to select property,, and then scroll to Mainmenu1, I will
                          then
                          >>see
                          >>the main menu. if the current control is no men menu, I will not see
                          >>main
                          >>menu in designer.
                          >>>
                          >>2. when running, no main menu either
                          >>>
                          >>
                          >Is it possible that you accidentally "hide" your Mainmenu behind some
                          >other Controls or Containers (A Panel, GroupBox or whatever)?
                          >Stupid question, I know - But this was the only way for me to create
                          >this problem...
                          >>
                          >
                          >
                          >
                          >
                          >

                          Comment

                          • Ryan S. Thiele

                            #14
                            Re: main menu disappearred

                            Strange that that happens since the MainMenu is derived from a control....

                            Have you tried this code...

                            Me.Controls.Add Range(New Control() {Me.MainMenu1})

                            Actually am suprised that you don't have MainMenuStrip control.


                            --
                            Thiele Enterprises - The Power Is In Your Hands Now!

                            --
                            "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comwr ote in message
                            news:u$UqwdB9GH A.4756@TK2MSFTN GP06.phx.gbl...
                            thank you your patience
                            however

                            Controls.Add(Ma inMenu1)
                            yields compiler error of
                            Error 1 Value of type 'System.Windows .Forms.MainMenu ' cannot be
                            converted to 'System.Windows .Forms.Control' .

                            "Ryan S. Thiele" <maligui@verizo n.netwrote in message
                            news:ybZZg.4621 $kG5.2814@trndn y07...
                            to use the addrange method, you have to declare an instance.
                            >
                            Controls.AddRan ge(New MainMenu() {MainMenu1})
                            >
                            you can also use:
                            >
                            Controls.Add(Ma inMenu1)
                            >
                            --
                            Thiele Enterprises - The Power Is In Your Hands Now!
                            >
                            --
                            "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comwr ote in message
                            news:%23oq$qbA9 GHA.4712@TK2MSF TNGP03.phx.gbl. ..
                            Thank you.
                            >
                            unfortunately Me.Controls.Add Range(MainMenu1 )
                            leads to error:
                            Error 1 Value of type 'System.Windows .Forms.MainMenu ' cannot be converted
                            to
                            '1-dimensional array of System.Windows. Forms.Control'. ...myform.vb 1284
                            30
                            myform
                            >
                            actually there is no prior me.control.addr ange but quite a number of
                            me.controls.add (...)
                            none for me.mainmenu1
                            if I use add instead of addrange
                            Me.Controls.Add (MainMenu1)
                            I get similar message like using addrange.
                            >
                            btw, I am using visual basic .net 2005 express with latest update. the
                            project initially upgraded an webICHpstCtrl demo project from prior
                            version
                            (.net 1?). The main menu was visible both in designer and in run time. I
                            had ripped out the ole webbrowser component and replaced with an more
                            ..net
                            interface webbrowser.
                            There was and there still is not separate designer file for myform.
                            >
                            >
                            >
                            If I create a new project, I will not see any guid component the main code
                            file but see the in the designer file. that is I end up with 2 partial
                            classes
                            >
                            "Ryan S. Thiele" <maligui@verizo n.netwrote in message
                            news:UzWZg.7064 $Z46.4151@trndn y05...
                            it looks as if the menu is not included in the controlcollecit on.

                            Find a line the says something close to:

                            MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl})

                            If your menu is not listed in the control collection, add it manually.

                            MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl,
                            MyMenuControl})


                            See if this helps....

                            --
                            Thiele Enterprises - The Power Is In Your Hands Now!
                            "gs" <gs@dontMail.te luswrote in message
                            news:O2r1uE68GH A.2268@TK2MSFTN GP05.phx.gbl...
                            oh, btw, I went to code and extract the code for mainenu
                            >
                            >
                            'Required by the Windows Form Designer
                            >
                            Private components As System.Componen t.IContainer
                            >
                            'NOTE: The following procedure is required by the Windows Form
                            Designer
                            >
                            'It can be modified using the Windows Form Designer.
                            >
                            'Do not modify it using the code editor.
                            >
                            Friend WithEvents MainMenu1 As System.Windows. Forms.MainMenu
                            >
                            ...
                            >
                            >
                            <System.Diagnos tics.DebuggerSt epThrough()Priv ate Sub
                            InitializeCompo nent()
                            >
                            Me.components = New System.Componen tModel.Containe r
                            >
                            Dim resources As System.Componen tModel.Componen tResourceManage r = New
                            System.Componen tModel.Componen tResourceManage r(GetType(FormM yApp))
                            >
                            Me.MainMenu1 = New System.Windows. Forms.MainMenu( Me.components)
                            >
                            Me.fileMI = New System.Windows. Forms.MenuItem
                            >
                            Me.openMI = New System.Windows. Forms.MenuItem
                            >
                            Me.printMI = New System.Windows. Forms.MenuItem
                            >
                            Me.MenuItem6 = New System.Windows. Forms.MenuItem
                            >
                            Me.exitMI = New System.Windows. Forms.MenuItem
                            >
                            Me.editMI = New System.Windows. Forms.MenuItem
                            >
                            Me.cutMI = New System.Windows. Forms.MenuItem
                            >
                            Me.copyMI = New System.Windows. Forms.MenuItem
                            >
                            Me.pasteMI = New System.Windows. Forms.MenuItem
                            >
                            Me.MenuItem12 = New System.Windows. Forms.MenuItem
                            >
                            Me.findMI = New System.Windows. Forms.MenuItem
                            >
                            Me.viewSourceMI = New System.Windows. Forms.MenuItem
                            >
                            Me.toolsMI = New System.Windows. Forms.MenuItem
                            >
                            Me.internetOpti onsMI = New System.Windows. Forms.MenuItem
                            >
                            Me.helpMI = New System.Windows. Forms.MenuItem
                            >
                            Me.aboutMI = New System.Windows. Forms.MenuItem
                            >
                            Me.contextMenu = New System.Windows. Forms.ContextMe nu
                            >
                            ...
                            >
                            'MainMenu1
                            >
                            '
                            >
                            Me.MainMenu1.Me nuItems.AddRang e(New System.Windows. Forms.MenuItem( )
                            {Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
                            Me.helpMI})
                            >
                            '
                            >
                            'fileMI
                            >
                            '
                            >
                            Me.fileMI.Index = 0
                            >
                            Me.fileMI.MenuI tems.AddRange(N ew System.Windows. Forms.MenuItem( )
                            {Me.openMI, Me.printMI, Me.MenuItem6, Me.exitMI})
                            >
                            Me.fileMI.Text = "File"
                            >
                            '
                            >
                            'openMI
                            >
                            '
                            >
                            Me.openMI.Index = 0
                            >
                            Me.openMI.Text = "&Open..."
                            >
                            '
                            >
                            'printMI
                            >
                            '
                            >
                            Me.printMI.Inde x = 1
                            >
                            Me.printMI.Text = "&Print..."
                            >
                            ......
                            >
                            "Norman Chong" <normanchong@fr eenet.dewrote in message
                            news:1161238925 .443548.108790@ b28g2000cwb.goo glegroups.com.. .
                            >
                            >>
                            >gs schrieb:
                            >>
                            >>thanks
                            >>both.
                            >>1
                            >>in design mode, the main menu does not show up. Unless I click on
                            any
                            >>control to select property,, and then scroll to Mainmenu1, I will
                            then
                            >>see
                            >>the main menu. if the current control is no men menu, I will not see
                            >>main
                            >>menu in designer.
                            >>>
                            >>2. when running, no main menu either
                            >>>
                            >>
                            >Is it possible that you accidentally "hide" your Mainmenu behind some
                            >other Controls or Containers (A Panel, GroupBox or whatever)?
                            >Stupid question, I know - But this was the only way for me to create
                            >this problem...
                            >>
                            >
                            >
                            >
                            >
                            >


                            Comment

                            • GS

                              #15
                              Re: main menu disappearred

                              yes, same problem, not compatible with controls.



                              talking about menu strip. I am trying somehow specify meainmenu1 for use
                              with menustrip.

                              hopefully, I have better luck there. failing that figure out use of
                              icomponent.

                              failing that start from scratch- a long process

                              "Ryan S. Thiele" <maligui@verizo n.netwrote in message
                              news:jxa_g.415$ k63.407@trndny0 6...
                              Strange that that happens since the MainMenu is derived from a control....
                              >
                              Have you tried this code...
                              >
                              Me.Controls.Add Range(New Control() {Me.MainMenu1})
                              >
                              Actually am suprised that you don't have MainMenuStrip control.
                              >
                              >
                              --
                              Thiele Enterprises - The Power Is In Your Hands Now!
                              >
                              --
                              "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comwr ote in message
                              news:u$UqwdB9GH A.4756@TK2MSFTN GP06.phx.gbl...
                              thank you your patience
                              however
                              >
                              Controls.Add(Ma inMenu1)
                              yields compiler error of
                              Error 1 Value of type 'System.Windows .Forms.MainMenu ' cannot be
                              converted to 'System.Windows .Forms.Control' .
                              >
                              "Ryan S. Thiele" <maligui@verizo n.netwrote in message
                              news:ybZZg.4621 $kG5.2814@trndn y07...
                              to use the addrange method, you have to declare an instance.

                              Controls.AddRan ge(New MainMenu() {MainMenu1})

                              you can also use:

                              Controls.Add(Ma inMenu1)

                              --
                              Thiele Enterprises - The Power Is In Your Hands Now!

                              --
                              "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comwr ote in message
                              news:%23oq$qbA9 GHA.4712@TK2MSF TNGP03.phx.gbl. ..
                              Thank you.

                              unfortunately Me.Controls.Add Range(MainMenu1 )
                              leads to error:
                              Error 1 Value of type 'System.Windows .Forms.MainMenu ' cannot be
                              converted
                              to
                              '1-dimensional array of System.Windows. Forms.Control'. ...myform.vb 1284
                              30
                              myform

                              actually there is no prior me.control.addr ange but quite a number of
                              me.controls.add (...)
                              none for me.mainmenu1
                              if I use add instead of addrange
                              Me.Controls.Add (MainMenu1)
                              I get similar message like using addrange.

                              btw, I am using visual basic .net 2005 express with latest update. the
                              project initially upgraded an webICHpstCtrl demo project from prior
                              version
                              (.net 1?). The main menu was visible both in designer and in run time.
                              I
                              had ripped out the ole webbrowser component and replaced with an more
                              .net
                              interface webbrowser.
                              There was and there still is not separate designer file for myform.



                              If I create a new project, I will not see any guid component the main
                              code
                              file but see the in the designer file. that is I end up with 2 partial
                              classes

                              "Ryan S. Thiele" <maligui@verizo n.netwrote in message
                              news:UzWZg.7064 $Z46.4151@trndn y05...
                              it looks as if the menu is not included in the controlcollecit on.
                              >
                              Find a line the says something close to:
                              >
                              MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl})
                              >
                              If your menu is not listed in the control collection, add it manually.
                              >
                              MyForm.Controls .AddRange(New Control() {AControl,Anoth erControl,
                              MyMenuControl})
                              >
                              >
                              See if this helps....
                              >
                              --
                              Thiele Enterprises - The Power Is In Your Hands Now!
                              "gs" <gs@dontMail.te luswrote in message
                              news:O2r1uE68GH A.2268@TK2MSFTN GP05.phx.gbl...
                              oh, btw, I went to code and extract the code for mainenu


                              'Required by the Windows Form Designer

                              Private components As System.Componen t.IContainer

                              'NOTE: The following procedure is required by the Windows Form
                              Designer

                              'It can be modified using the Windows Form Designer.

                              'Do not modify it using the code editor.

                              Friend WithEvents MainMenu1 As System.Windows. Forms.MainMenu

                              ...


                              <System.Diagnos tics.DebuggerSt epThrough()Priv ate Sub
                              InitializeCompo nent()

                              Me.components = New System.Componen tModel.Containe r

                              Dim resources As System.Componen tModel.Componen tResourceManage r =
                              New
                              System.Componen tModel.Componen tResourceManage r(GetType(FormM yApp))

                              Me.MainMenu1 = New System.Windows. Forms.MainMenu( Me.components)

                              Me.fileMI = New System.Windows. Forms.MenuItem

                              Me.openMI = New System.Windows. Forms.MenuItem

                              Me.printMI = New System.Windows. Forms.MenuItem

                              Me.MenuItem6 = New System.Windows. Forms.MenuItem

                              Me.exitMI = New System.Windows. Forms.MenuItem

                              Me.editMI = New System.Windows. Forms.MenuItem

                              Me.cutMI = New System.Windows. Forms.MenuItem

                              Me.copyMI = New System.Windows. Forms.MenuItem

                              Me.pasteMI = New System.Windows. Forms.MenuItem

                              Me.MenuItem12 = New System.Windows. Forms.MenuItem

                              Me.findMI = New System.Windows. Forms.MenuItem

                              Me.viewSourceMI = New System.Windows. Forms.MenuItem

                              Me.toolsMI = New System.Windows. Forms.MenuItem

                              Me.internetOpti onsMI = New System.Windows. Forms.MenuItem

                              Me.helpMI = New System.Windows. Forms.MenuItem

                              Me.aboutMI = New System.Windows. Forms.MenuItem

                              Me.contextMenu = New System.Windows. Forms.ContextMe nu

                              ...

                              'MainMenu1

                              '

                              Me.MainMenu1.Me nuItems.AddRang e(New System.Windows. Forms.MenuItem( )
                              {Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
                              Me.helpMI})

                              '

                              'fileMI

                              '

                              Me.fileMI.Index = 0

                              Me.fileMI.MenuI tems.AddRange(N ew System.Windows. Forms.MenuItem( )
                              {Me.openMI, Me.printMI, Me.MenuItem6, Me.exitMI})

                              Me.fileMI.Text = "File"

                              '

                              'openMI

                              '

                              Me.openMI.Index = 0

                              Me.openMI.Text = "&Open..."

                              '

                              'printMI

                              '

                              Me.printMI.Inde x = 1

                              Me.printMI.Text = "&Print..."

                              ......

                              "Norman Chong" <normanchong@fr eenet.dewrote in message
                              news:1161238925 .443548.108790@ b28g2000cwb.goo glegroups.com.. .

                              >
                              gs schrieb:
                              >
                              >thanks
                              >both.
                              >1
                              >in design mode, the main menu does not show up. Unless I click on
                              any
                              >control to select property,, and then scroll to Mainmenu1, I will
                              then
                              >see
                              >the main menu. if the current control is no men menu, I will not
                              see
                              >main
                              >menu in designer.
                              >>
                              >2. when running, no main menu either
                              >>
                              >
                              Is it possible that you accidentally "hide" your Mainmenu behind
                              some
                              other Controls or Containers (A Panel, GroupBox or whatever)?
                              Stupid question, I know - But this was the only way for me to
                              create
                              this problem...
                              >


                              >
                              >
                              >
                              >
                              >

                              Comment

                              Working...