Missing Menu Items

  • Thread starter Thread starter Herb
  • Start date Start date
H

Herb

I had a menustrip with multiple items. Upon opening my project I got an error
message that a file had been altered by an outside process. It asked if I
wanted to reload the file. I believe I said yes.

Now my menustrip has no menuitems. My SourceSafe versions don't seem to have
them either.

Any ideas?
 
Hi stullhe104,

Thank you for using Microsoft Managed Newsgroup Service, I'm Zhi-Xin Ye,
it's my pleasure to work with you on this issue.
Upon opening my project I got an error
message that a file had been altered by an outside process.

It seems you have altered the file content outside the IDE. If the
menuitems are added by the designer, you can check the .designer.cs (or
designer.vb ) file to see whether the menuitems are added into the item
collection, if the items are added, there should be something like this in
the code:

this.menustrip1.Items.Add(this.menustripitem1);

If the menu items are not added into the item collection, you can add them
manually.

If anything is unclear or you have any concerns, please feel free to let
me know.

Have a wonderful day!

Best Regards,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Thanks for your reply.

The lines needed are in my Designer.vb file, but they do not show in the
Items Collection in the graphical interface.

(from frmMain.Designer.vb)
Me.mnuMain = New System.Windows.Forms.MenuStrip
Me.mnuitmFile = New System.Windows.Forms.ToolStripMenuItem
Me.mnuitmExit = New System.Windows.Forms.ToolStripMenuItem
Me.mnuitmHelp = New System.Windows.Forms.ToolStripMenuItem
Me.mnuitmAbout = New System.Windows.Forms.ToolStripMenuItem
 
Hi stullhe104,

Have you check the designer.vb file whether the items are added to the
collection? If they're added, there should be something like this:

Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem()
{Me.ToolStripMenuItem1, Me.ToolStripMenuItem2})
......
Me.ToolStripMenuItem1.DropDownItems.AddRange(New
System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem2})
......

If the items are not added, you can added them manually.

Best Regards,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Thank you, that did it. I had to manually change the line in the .vb file
with a text editor, but now it is working properly.

Thanks,
 
Back
Top