locked
Menu that refuses to leave RRS feed

  • Question

  • Hello World,

    I have an old app still written in VB2003 that required some changes, part of that was revamping a menu that isn't behaving.  I've deleted it and it doesn't show in the designer but when I start the program there it is, and still not correct.  How do I really get rid of it so I can build another one?  I'd hate to have to delete the whole MainMenu, this is the 5th in line, that would be a lot of re-creating.

    Thanks for the help,  


    Nitromuse

    Wednesday, February 22, 2012 5:00 PM

All replies

  • Are you building the app and starting from there or starting from the IDE ? If you are building, what path is the app in and what's the file date ?

    Wednesday, February 22, 2012 7:21 PM
  • I'm just attempting to tweak an existing App, been around 5 plus years, works great.  But VS just wouldn't let go of the menu, not a sign of it in the designer or the Form Designer Generated Code, but every time I hit F5, there it was.  I finally reverted back to a previous version of the whole directory and just went through 4 hours of tedium getting back to square 1, at least I can address square 2 tomorrow.

    Thanks again for your help.


    Nitromuse

    Wednesday, February 22, 2012 10:16 PM
  • Nitromuse,

    This is just a guess, but perhaps by hitting run, you were excuting an earlier compiled version.  It can happen if the date-time on the executable has a newer date-time than your current system time.  I run into this when exchanging code with someone in a time zone several hours ahead of me.  In VS2008 I run into it when trying to set a break point and it tells me the executable is more recent than the source or something like that.  Cleaning out the build directory clears up the issue.

    • Proposed as answer by Mark Liu-lxf Friday, February 24, 2012 5:16 AM
    Thursday, February 23, 2012 2:11 AM
  • Thanks Mark, where do I find the build directory in VS2003?  I've looked under the Build tab Configuration Manager and it only has one entry, I assume that it is the one I'm working with.

    Thanks again,


    Nitromuse

    Saturday, February 25, 2012 9:59 PM
  • Thanks Mark, where do I find the build directory in VS2003?  I've looked under the Build tab Configuration Manager and it only has one entry, I assume that it is the one I'm working with.

    Thanks again,


    Nitromuse

    What TN was talking about is the "\bin" folder. It has two subfolders: \debug and \release.

    Another thing that can cause this - as this happened to me and made me want to pull my hair out figuring it out - is if you happen to be running the built program at the time and you have it set for "Single Instance".

    It drove me crazy - or at least that's the excuse I use. ;-)

    I hope this helps. :)

    Saturday, February 25, 2012 11:20 PM
  • Hi Nitromuse,

    You can try to rebulid the program by yourself. In this way, you also can clean the build direction.

    Just Right click the solution name in Solution Explorer windows, and click the rebuliding solution button.

    Hope it helps.


    No code, No fact.

    Monday, February 27, 2012 9:41 AM
  • I'm unfamiliar with VB 2003 but I may be able to help.

    In Visual Studio's Solution Explorer pane, try clicking the button that says "show all files". In there if you see a file names <form>.designer.vb where <form> is the name of your form, open that. Within that file is the designer generated code for your form. It is generally recommended not to edit it. And whenever you do edit it, be sure to back up the file first (i.e. copy/paste into notepad).


    Jordan, one of the main changes between version 2003 and version 2005 (in fact Framework 1.x and Framework 2.0) was the adding of the partial class. 

    With that it became possible to set the forms designer code in a separated file.

    So strange the OP does not see the menu code in his windows forms class. Many have "tweaked" it in version 2003 and removed the warning not to do that. 

    Probably it is just behind a + even if it is referencing another class, it can be nowhere else in the case of version 2003 and earlier.

    :-)

     


    Success
    Cor


    Monday, February 27, 2012 10:41 AM