By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,780 Members | 1,520 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,780 IT Pros & Developers. It's quick & easy.

main menu disappearred

P: n/a
GS
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
Oct 18 '06 #1
Share this Question
Share on Google+
17 Replies


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

--
Thiele Enterprises - The Power Is In Your Hands Now!
Oct 19 '06 #2

P: n/a
gs
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" <ma*****@verizon.netwrote in message
news:8vBZg.5891$IW6.4606@trndny01...
Explain a little bit please, are you running/debugging? Are you designing?

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

Oct 19 '06 #3

P: n/a
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!
Oct 19 '06 #4

P: n/a

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...

Oct 19 '06 #5

P: n/a
gs

"Ryan S. Thiele" <ma*****@verizon.netwrote in message
news:61CZg.5448$5v5.2421@trndny08...
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!

Oct 19 '06 #6

P: n/a
gs
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" <no*********@freenet.dewrote in message
news:11**********************@b28g2000cwb.googlegr oups.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...

Oct 19 '06 #7

P: n/a
gs
oh, btw, I went to code and extract the code for mainenu
'Required by the Windows Form Designer

Private components As System.Component.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.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()

Me.components = New System.ComponentModel.Container

Dim resources As System.ComponentModel.ComponentResourceManager = New
System.ComponentModel.ComponentResourceManager(Get Type(FormMyApp))

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.internetOptionsMI = 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.ContextMenu

....

'MainMenu1

'

Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem()
{Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI, Me.helpMI})

'

'fileMI

'

Me.fileMI.Index = 0

Me.fileMI.MenuItems.AddRange(New 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.Index = 1

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

.......

"Norman Chong" <no*********@freenet.dewrote in message
news:11**********************@b28g2000cwb.googlegr oups.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...

Oct 19 '06 #8

P: n/a
it looks as if the menu is not included in the controlcolleciton.

Find a line the says something close to:

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

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

MyForm.Controls.AddRange(New Control() {AControl,AnotherControl,
MyMenuControl})
See if this helps....

--
Thiele Enterprises - The Power Is In Your Hands Now!
"gs" <gs@dontMail.teluswrote in message
news:O2**************@TK2MSFTNGP05.phx.gbl...
oh, btw, I went to code and extract the code for mainenu
'Required by the Windows Form Designer

Private components As System.Component.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.Diagnostics.DebuggerStepThrough()Private Sub
InitializeComponent()

Me.components = New System.ComponentModel.Container

Dim resources As System.ComponentModel.ComponentResourceManager = New
System.ComponentModel.ComponentResourceManager(Get Type(FormMyApp))

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.internetOptionsMI = 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.ContextMenu

...

'MainMenu1

'

Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem()
{Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI, Me.helpMI})

'

'fileMI

'

Me.fileMI.Index = 0

Me.fileMI.MenuItems.AddRange(New 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.Index = 1

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

......

"Norman Chong" <no*********@freenet.dewrote in message
news:11**********************@b28g2000cwb.googlegr oups.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...


Oct 20 '06 #9

P: n/a
GS
Thank you.

unfortunately Me.Controls.AddRange(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.addrange 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" <ma*****@verizon.netwrote in message
news:UzWZg.7064$Z46.4151@trndny05...
it looks as if the menu is not included in the controlcolleciton.

Find a line the says something close to:

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

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

MyForm.Controls.AddRange(New Control() {AControl,AnotherControl,
MyMenuControl})
See if this helps....

--
Thiele Enterprises - The Power Is In Your Hands Now!
"gs" <gs@dontMail.teluswrote in message
news:O2**************@TK2MSFTNGP05.phx.gbl...
oh, btw, I went to code and extract the code for mainenu
'Required by the Windows Form Designer

Private components As System.Component.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.Diagnostics.DebuggerStepThrough()Private Sub
InitializeComponent()

Me.components = New System.ComponentModel.Container

Dim resources As System.ComponentModel.ComponentResourceManager = New
System.ComponentModel.ComponentResourceManager(Get Type(FormMyApp))

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.internetOptionsMI = 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.ContextMenu

...

'MainMenu1

'

Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem()
{Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
Me.helpMI})

'

'fileMI

'

Me.fileMI.Index = 0

Me.fileMI.MenuItems.AddRange(New 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.Index = 1

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

......

"Norman Chong" <no*********@freenet.dewrote in message
news:11**********************@b28g2000cwb.googlegr oups.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...


Oct 20 '06 #10

P: n/a
to use the addrange method, you have to declare an instance.

Controls.AddRange(New MainMenu() {MainMenu1})

you can also use:

Controls.Add(MainMenu1)

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

--
"GS" <gs**********************@msnews.Nomail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Thank you.

unfortunately Me.Controls.AddRange(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.addrange 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" <ma*****@verizon.netwrote in message
news:UzWZg.7064$Z46.4151@trndny05...
it looks as if the menu is not included in the controlcolleciton.

Find a line the says something close to:

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

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

MyForm.Controls.AddRange(New Control() {AControl,AnotherControl,
MyMenuControl})
See if this helps....

--
Thiele Enterprises - The Power Is In Your Hands Now!
"gs" <gs@dontMail.teluswrote in message
news:O2**************@TK2MSFTNGP05.phx.gbl...
oh, btw, I went to code and extract the code for mainenu
'Required by the Windows Form Designer

Private components As System.Component.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.Diagnostics.DebuggerStepThrough()Private Sub
InitializeComponent()

Me.components = New System.ComponentModel.Container

Dim resources As System.ComponentModel.ComponentResourceManager = New
System.ComponentModel.ComponentResourceManager(Get Type(FormMyApp))

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.internetOptionsMI = 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.ContextMenu

...

'MainMenu1

'

Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem()
{Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
Me.helpMI})

'

'fileMI

'

Me.fileMI.Index = 0

Me.fileMI.MenuItems.AddRange(New 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.Index = 1

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

......

"Norman Chong" <no*********@freenet.dewrote in message
news:11**********************@b28g2000cwb.googlegr oups.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...



Oct 20 '06 #11

P: n/a
If you add more then one control you can use the addrange method, forgot to
add this...

Controls.Addrange({Control1,Control2,etc})

Or you can add them one at a time.

Controls.Add(Control1)
Controls.Add(Control2)
etc...
--
Thiele Enterprises - The Power Is In Your Hands Now!

--
"GS" <gs**********************@msnews.Nomail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Thank you.

unfortunately Me.Controls.AddRange(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.addrange 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" <ma*****@verizon.netwrote in message
news:UzWZg.7064$Z46.4151@trndny05...
it looks as if the menu is not included in the controlcolleciton.

Find a line the says something close to:

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

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

MyForm.Controls.AddRange(New Control() {AControl,AnotherControl,
MyMenuControl})
See if this helps....

--
Thiele Enterprises - The Power Is In Your Hands Now!
"gs" <gs@dontMail.teluswrote in message
news:O2**************@TK2MSFTNGP05.phx.gbl...
oh, btw, I went to code and extract the code for mainenu
'Required by the Windows Form Designer

Private components As System.Component.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.Diagnostics.DebuggerStepThrough()Private Sub
InitializeComponent()

Me.components = New System.ComponentModel.Container

Dim resources As System.ComponentModel.ComponentResourceManager = New
System.ComponentModel.ComponentResourceManager(Get Type(FormMyApp))

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.internetOptionsMI = 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.ContextMenu

...

'MainMenu1

'

Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem()
{Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
Me.helpMI})

'

'fileMI

'

Me.fileMI.Index = 0

Me.fileMI.MenuItems.AddRange(New 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.Index = 1

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

......

"Norman Chong" <no*********@freenet.dewrote in message
news:11**********************@b28g2000cwb.googlegr oups.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...



Oct 20 '06 #12

P: n/a
GS
thank you your patience
however

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

"Ryan S. Thiele" <ma*****@verizon.netwrote in message
news:ybZZg.4621$kG5.2814@trndny07...
to use the addrange method, you have to declare an instance.

Controls.AddRange(New MainMenu() {MainMenu1})

you can also use:

Controls.Add(MainMenu1)

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

--
"GS" <gs**********************@msnews.Nomail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Thank you.

unfortunately Me.Controls.AddRange(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.addrange 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" <ma*****@verizon.netwrote in message
news:UzWZg.7064$Z46.4151@trndny05...
it looks as if the menu is not included in the controlcolleciton.

Find a line the says something close to:

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

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

MyForm.Controls.AddRange(New Control() {AControl,AnotherControl,
MyMenuControl})
See if this helps....

--
Thiele Enterprises - The Power Is In Your Hands Now!
"gs" <gs@dontMail.teluswrote in message
news:O2**************@TK2MSFTNGP05.phx.gbl...
oh, btw, I went to code and extract the code for mainenu
>
>
'Required by the Windows Form Designer
>
Private components As System.Component.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.Diagnostics.DebuggerStepThrough()Private Sub
InitializeComponent()
>
Me.components = New System.ComponentModel.Container
>
Dim resources As System.ComponentModel.ComponentResourceManager = New
System.ComponentModel.ComponentResourceManager(Get Type(FormMyApp))
>
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.internetOptionsMI = 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.ContextMenu
>
...
>
'MainMenu1
>
'
>
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem()
{Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
Me.helpMI})
>
'
>
'fileMI
>
'
>
Me.fileMI.Index = 0
>
Me.fileMI.MenuItems.AddRange(New 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.Index = 1
>
Me.printMI.Text = "&Print..."
>
......
>
"Norman Chong" <no*********@freenet.dewrote in message
news:11**********************@b28g2000cwb.googlegr oups.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...
>>
>
>



Oct 20 '06 #13

P: n/a
Strange that that happens since the MainMenu is derived from a control....

Have you tried this code...

Me.Controls.AddRange(New Control() {Me.MainMenu1})

Actually am suprised that you don't have MainMenuStrip control.
--
Thiele Enterprises - The Power Is In Your Hands Now!

--
"GS" <gs**********************@msnews.Nomail.comwrote in message
news:u$**************@TK2MSFTNGP06.phx.gbl...
thank you your patience
however

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

"Ryan S. Thiele" <ma*****@verizon.netwrote in message
news:ybZZg.4621$kG5.2814@trndny07...
to use the addrange method, you have to declare an instance.

Controls.AddRange(New MainMenu() {MainMenu1})

you can also use:

Controls.Add(MainMenu1)

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

--
"GS" <gs**********************@msnews.Nomail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Thank you.

unfortunately Me.Controls.AddRange(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.addrange 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" <ma*****@verizon.netwrote in message
news:UzWZg.7064$Z46.4151@trndny05...
it looks as if the menu is not included in the controlcolleciton.

Find a line the says something close to:

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

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

MyForm.Controls.AddRange(New Control() {AControl,AnotherControl,
MyMenuControl})
See if this helps....

--
Thiele Enterprises - The Power Is In Your Hands Now!
"gs" <gs@dontMail.teluswrote in message
news:O2**************@TK2MSFTNGP05.phx.gbl...
oh, btw, I went to code and extract the code for mainenu
>
>
'Required by the Windows Form Designer
>
Private components As System.Component.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.Diagnostics.DebuggerStepThrough()Private Sub
InitializeComponent()
>
Me.components = New System.ComponentModel.Container
>
Dim resources As System.ComponentModel.ComponentResourceManager = New
System.ComponentModel.ComponentResourceManager(Get Type(FormMyApp))
>
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.internetOptionsMI = 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.ContextMenu
>
...
>
'MainMenu1
>
'
>
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem()
{Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
Me.helpMI})
>
'
>
'fileMI
>
'
>
Me.fileMI.Index = 0
>
Me.fileMI.MenuItems.AddRange(New 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.Index = 1
>
Me.printMI.Text = "&Print..."
>
......
>
"Norman Chong" <no*********@freenet.dewrote in message
news:11**********************@b28g2000cwb.googlegr oups.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...
>>
>
>




Oct 20 '06 #14

P: n/a
GS
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" <ma*****@verizon.netwrote in message
news:jxa_g.415$k63.407@trndny06...
Strange that that happens since the MainMenu is derived from a control....

Have you tried this code...

Me.Controls.AddRange(New Control() {Me.MainMenu1})

Actually am suprised that you don't have MainMenuStrip control.
--
Thiele Enterprises - The Power Is In Your Hands Now!

--
"GS" <gs**********************@msnews.Nomail.comwrote in message
news:u$**************@TK2MSFTNGP06.phx.gbl...
thank you your patience
however

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

"Ryan S. Thiele" <ma*****@verizon.netwrote in message
news:ybZZg.4621$kG5.2814@trndny07...
to use the addrange method, you have to declare an instance.

Controls.AddRange(New MainMenu() {MainMenu1})

you can also use:

Controls.Add(MainMenu1)

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

--
"GS" <gs**********************@msnews.Nomail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Thank you.

unfortunately Me.Controls.AddRange(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.addrange 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" <ma*****@verizon.netwrote in message
news:UzWZg.7064$Z46.4151@trndny05...
it looks as if the menu is not included in the controlcolleciton.
>
Find a line the says something close to:
>
MyForm.Controls.AddRange(New Control() {AControl,AnotherControl})
>
If your menu is not listed in the control collection, add it manually.
>
MyForm.Controls.AddRange(New Control() {AControl,AnotherControl,
MyMenuControl})
>
>
See if this helps....
>
--
Thiele Enterprises - The Power Is In Your Hands Now!
"gs" <gs@dontMail.teluswrote in message
news:O2**************@TK2MSFTNGP05.phx.gbl...
oh, btw, I went to code and extract the code for mainenu


'Required by the Windows Form Designer

Private components As System.Component.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.Diagnostics.DebuggerStepThrough()Private Sub
InitializeComponent()

Me.components = New System.ComponentModel.Container

Dim resources As System.ComponentModel.ComponentResourceManager =
New
System.ComponentModel.ComponentResourceManager(Get Type(FormMyApp))

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.internetOptionsMI = 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.ContextMenu

...

'MainMenu1

'

Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem()
{Me.fileMI, Me.editMI, Me.toolsMI, Me.analyseMI, Me.searchMI,
Me.helpMI})

'

'fileMI

'

Me.fileMI.Index = 0

Me.fileMI.MenuItems.AddRange(New 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.Index = 1

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

......

"Norman Chong" <no*********@freenet.dewrote in message
news:11**********************@b28g2000cwb.googlegr oups.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...
>


>
>



Oct 21 '06 #15

P: n/a
gs
thank you for continue working with me on this one.

making mainmenu1 to appear in run time turns out to be as simple as adding
menu = mainmenu1
in form load event.

now only if I can make mainmenu1 appear in designer then the problem would
be completely solved

"GS" <gs**********************@msnews.Nomail.comwrote in message
news:ez**************@TK2MSFTNGP03.phx.gbl...
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


Oct 21 '06 #16

P: n/a
hello gs ,

Place a new main menu at the top and set the action handlers of the onew
method handled by the old menu functions. this will solve your Problem.

gs wrote:
>thank you for continue working with me on this one.

making mainmenu1 to appear in run time turns out to be as simple as adding
menu = mainmenu1
in form load event.

now only if I can make mainmenu1 appear in designer then the problem would
be completely solved
>the main menu in the application seemed to disappeared all together until
I
[quoted text clipped - 4 lines]
>>
what can I do. to fix the problem
--
Atheeque

Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200610/1

Oct 21 '06 #17

P: n/a
GS
thank you. in visual basic studio express 2005, where can find in designer
the tool for mainmenu?
Or were you taking about a new menustrip under All windows Forms of the
toolbox?

I found another to access the mainmenu1 from designer. Open Document
Outline for the form, expand and locate MainMenu1
From there, I can add /change items in the designer. So this will do for
now
"Atheeque via DotNetMonster.com" <u28130@uwewrote in message
news:68192395979ec@uwe...
hello gs ,

Place a new main menu at the top and set the action handlers of the onew
method handled by the old menu functions. this will solve your Problem.

gs wrote:
thank you for continue working with me on this one.

making mainmenu1 to appear in run time turns out to be as simple as
adding
menu = mainmenu1
in form load event.

now only if I can make mainmenu1 appear in designer then the problem
would
be completely solved
the main menu in the application seemed to disappeared all together
until
I
[quoted text clipped - 4 lines]
>
what can I do. to fix the problem

--
Atheeque

Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200610/1

Oct 24 '06 #18

This discussion thread is closed

Replies have been disabled for this discussion.