CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Jun 2004
    Location
    NH
    Posts
    678

    Thumbs down Major MenuStrip bug

    AHhhhhhhh!

    Repeat after me:
    I will not trust the MenuStrip component.
    I will not trust the MenuStrip component.
    I will not...
    I was simply adding an image to a picturebox, on the main form.
    When I loaded my application, I noticed that the menustrip was missing 3 items! The only thing I can think of is that the resource file, has become corrupt for no apparent reason. The image was a simple small pic made with ms paint, and I made a test app that has no problem with this picture, and menustrip.

    So I try to add an item to replace the missing items, and upon closing the menu, it claims something like it's not set to instance of an object... ya right. Then I try using menu strip tasks thingy, to add them, and I get the error "Property not valid"(There is already a menu named that... yada yada)
    Now the menustrip won't open at all, and I might have to replace the whole thing, each item having an image. I don't even know the extent of corruption yet, but this really stinks!
    I would assume, that I should be able to get the items back, but VB isn't budging.

    I hope someone could help me, if they have seen this problem before.
    The image below shows that I can't add an item with the name mnuNew, because it already exists, but as you can clearly see it does not exist.
    Attached Images Attached Images  

  2. #2
    Join Date
    Jun 2004
    Location
    NH
    Posts
    678

    Re: Major MenuStrip bug

    It's definatley related to resource files.

    I opened the project properties window, and opened the tab for resources, and found the image(.bmp) that I added. I deleted it.
    The menuStrip now doesn't show any sub items under the first main item(File). Nothing was brought back, but it's clearly related.


    EDIT:
    It then allows the designer file(Main.Designer.vb) to still carry the items as if they were there.
    This is why you can't create new ones with the same name.
    You can delete these items by opening the designer file, with notepad, and sifting through the items by name if you happen to remember the exact name. Otherwise it can take awhile.
    Last edited by TT(n); January 31st, 2009 at 05:26 PM.

  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Major MenuStrip bug

    Feel better?

    You know the drill. File it on CONNECT and they'll see if they can replicate it
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Jun 2004
    Location
    NH
    Posts
    678

    Re: Major MenuStrip bug

    Feel better?
    Ya, well it's finally setting in, and it's almost funny now.
    That's all I can do, just laugh it off, as if all that work didn't really matter.
    I guess I was a little harsh, but g-**** it, this one really cost me.
    It wasn't like I was even near the menustrip. Nevermind near my code, to get deleted.

    It may not be easy to reproduce, so that's why I'm trying to find the relationship between what I did, and what happened.

    I will file with CONNECT on this, once I've sorted it out a little more.
    Otherwise I fear that they will ignore it, without proper description etc.

    Thanks for cheering me up a little, dglienna.

  5. #5
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Major MenuStrip bug

    That's why you make backups, right? I've been zipping up projects daily, and haven't really *lost* much out of the past 1000 hours of coding. Maybe once or twice, when I forgot, but I still had the prior day to use.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  6. #6
    Join Date
    Jun 2004
    Location
    NH
    Posts
    678

    Re: Major MenuStrip bug

    Yes, I make alot of backups, sometimes so many it gets confusing about which version has what in it.
    I've got at least 4 major projects going now.
    These were minor incremental steps over time, that didn't seem to warrant a back up at each step, and I wasn't expecting the menustrip to ruin my code either.
    I didn't plan on vb messing with my code, I usually only plan for my own changes or mess ups.

    You got to watch everything like a hawk, and as soon as you don't BAM!

    hehe you should have backed up, its your fault this happened.
    Sorry for the inconvienience you may have caused yourself.
    .

    Sometimes I forget, but sometimes you don't think it's really necessary.

    I've been up working on this project ever since, just to get back to where I was when it all started.
    It may only take a week before I can go forward again.

  7. #7
    Join Date
    Feb 2009
    Posts
    56

    Re: Major MenuStrip bug

    If you contact me, I will sure help you on the project

  8. #8
    Join Date
    Mar 2007
    Location
    Argentina
    Posts
    579

    Re: Major MenuStrip bug

    Quote Originally Posted by TT(n) View Post
    ...
    I was simply adding an image to a picturebox, on the main form.
    When I loaded my application, I noticed that the menustrip was missing 3 items! ...
    Scary
    [Vb.NET 2008 (ex Express)]

  9. #9
    Join Date
    Feb 2009
    Posts
    56

    Re: Major MenuStrip bug

    it seems like everytime I pronounce "contact" then I see just noone around

  10. #10
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Major MenuStrip bug

    He's trying to rewrite code that he lost. You think you know it better than he did? That'd be cool...
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  11. #11
    Join Date
    Jun 2004
    Location
    NH
    Posts
    678

    Re: Major MenuStrip bug

    it seems like everytime I pronounce "contact" then I see just noone around
    I'm sorry, I didn't mean to be rude. I'm just busy.
    Thank you for your offer yuenqi, but it would take longer just to explain it, then it would take for you to help me.


    That'd be cool...
    I wish. I would have gladly jumped on the chance.

    My wrist is hurting now.... time for a break.

  12. #12
    Join Date
    Dec 2012
    Posts
    24

    Re: Major MenuStrip bug

    No, you weren't being harsh, the Menustrip is crap. It simply doesn't function correctly, or in my experience, at all.
    My advice is to remove it from the toolbox window and forget it ever existed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured