Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. MenuStrip and ToolStripButton corruption

MenuStrip and ToolStripButton corruption

Scheduled Pinned Locked Moved Windows Forms
visual-studioquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mark F
    wrote on last edited by
    #1

    I created a few custom icons for buttons and menus. One image was added to a ContextMenuStrip item. Later I changed it to a different image. I removed the previous image from the Resources.resx file using the IDE. Now the all the MenuStrips and ToolStripButtons are gone! :mad: This image is not connected in any way to any of the other MenuItems or ToolStripButtons. Is there any way to repair the project? I have a backup but it's much older. Thanks in advance, Mark

    A S 2 Replies Last reply
    0
    • M Mark F

      I created a few custom icons for buttons and menus. One image was added to a ContextMenuStrip item. Later I changed it to a different image. I removed the previous image from the Resources.resx file using the IDE. Now the all the MenuStrips and ToolStripButtons are gone! :mad: This image is not connected in any way to any of the other MenuItems or ToolStripButtons. Is there any way to repair the project? I have a backup but it's much older. Thanks in advance, Mark

      A Offline
      A Offline
      Adrian Cole
      wrote on last edited by
      #2

      I've run across the same kinds of problems before. I always end up editing the Visual Studio generated file (Form1.Designer.cs or something like that if you're using C# ... not sure for VB) by hand. I usually find that all the control creation code is still there, but I need to re-establish the parent-child control relationships. Something like: this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileMenu, this.editMenu, this.helpMenu } ); Look at a valid project to see the exact syntax.

      M 1 Reply Last reply
      0
      • A Adrian Cole

        I've run across the same kinds of problems before. I always end up editing the Visual Studio generated file (Form1.Designer.cs or something like that if you're using C# ... not sure for VB) by hand. I usually find that all the control creation code is still there, but I need to re-establish the parent-child control relationships. Something like: this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileMenu, this.editMenu, this.helpMenu } ); Look at a valid project to see the exact syntax.

        M Offline
        M Offline
        Mark F
        wrote on last edited by
        #3

        Thanks, I'll give it a try.

        1 Reply Last reply
        0
        • M Mark F

          I created a few custom icons for buttons and menus. One image was added to a ContextMenuStrip item. Later I changed it to a different image. I removed the previous image from the Resources.resx file using the IDE. Now the all the MenuStrips and ToolStripButtons are gone! :mad: This image is not connected in any way to any of the other MenuItems or ToolStripButtons. Is there any way to repair the project? I have a backup but it's much older. Thanks in advance, Mark

          S Offline
          S Offline
          srinivas kacham
          wrote on last edited by
          #4

          Hi, Go to IntializeComponent() method and set the Contextmenu image property manually.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups