If I remove the menu from a form then try to compile I get a resource error. Looking at the .rc file I see a reference to the top menu. Also codegen_formx_.inc there are still references to the menu. I assume this is causing the error.
How do I get rid of these so I can compile again?? I tried deleting these but they just come back!!
Thanks
Doug
I can't say that I've ever seen this.
Have you deleted all of the code lines under [TopMenuItems] in your *.frm file?
Do you have a CVS type of system that is restoring previously deleted edits?
[TopMenuItems]
TopMenuItem=&File|mnuFile|||0|0|0|0
TopMenuItem=&New|mnuNew||Ctrl+N|0|0|0|1
TopMenuItem=&Open|mnuOpen||Ctrl+O|0|0|0|1
TopMenuItem=-|mnuSep1|||0|0|0|1
TopMenuItem=&Save|mnuSave||Ctrl+S|0|0|0|1
TopMenuItem=Save &As|mnuSaveAs||F12|0|0|0|1
TopMenuItem=-|mnuSep2||(None)|0|0|0|1
TopMenuItem=E&xit\tAlt+F4|mnuExit|||0|0|0|1
TopMenuItem=&Edit|mnuEdit|||0|0|0|0
TopMenuItem=&Undo|mnuUndo||Ctrl+Z|0|0|0|1
TopMenuItem=-|mnuSep3|||0|0|0|1
TopMenuItem=C&lear|mnuClear|||0|0|0|1
TopMenuItem=Cu&t|mnuCut||Ctrl+X|0|0|0|1
TopMenuItem=&Copy|mnuCopy||Ctrl+C|0|0|0|1
TopMenuItem=&Paste|mnuPaste||Ctrl+V|0|0|0|1
TopMenuItem=&Window|mnuWindow|||0|0|0|0
TopMenuItem=&Tile|mnuTile|||0|0|0|1
TopMenuItem=&Cascade|mnuCascade|||0|0|0|1
TopMenuItem=&Arrange|mnuArrange|||0|0|0|1
TopMenuItem=Close A&ll|mnuCloseAll|||0|0|0|1
TopMenuItem=&Help|mnuHelp|||0|0|0|0
TopMenuItem=&About|mnuAbout|||0|0|0|1
I'm not sure what happened. I ended up copying in the entire project from a backup.
Doug
Well it happened again and its easy to reproduce.
Put a menu on a form then delete all menu items, click OK. If compiler I get a resource error.
The only way to get it to compile again is put the menu back (make a new menu)
QuoteDo you have a CVS type of system that is restoring previously deleted edits?
NO
Thanks
Doug
Hi Doug,
I just sent you an email. Part of it is as follows:
The proper way to remove a menu (or toolbar, or statusbar) is to
right-click on the Form and choose "Remove Menu" from the popup menu.
Simply going into the Menu Editor and removing all items is the way to
do it. FF3 still thinks there is a menu (albeit without any items
which may be why the resource error happens).
My menubar still shows the text of the last item too when all are deleted. And, the empty menu block crashing the RC. May need a check on exit of the menu editor that if blank/empty to delete the menu bar...unless there is a way to create an empty one properly and/or a need to do such a thing.
Thanks Paul
It may be a good idea to add the "Remove Menu" to the menu editor also at some point.