p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer (http://p2p.wrox.com/forumdisplay.php?f=574)
-   -   Lesson5 Exercise 2 Weird menu behavior (http://p2p.wrox.com/showthread.php?t=82334)

emdoc January 22nd, 2011 01:08 PM

Lesson5 Exercise 2 Weird menu behavior
GRRR. Forum dropped my post.. will try again.

Built menus from Lesson 5 Exercise 2. Easy. Added no code. Looks perfect in Form Designer. Ran program. No menus, only White box with red x running thru.

Any ideas? Forum won't let me add screenshot. Running Win7 x64, C# 2010 Express.

emdoc January 22nd, 2011 01:15 PM

still weirder
So, I find out that in I run using f5, I get weird behavior as above, but if I build program and run from SimpleEdit.exe, I get correct behavior- good "working" menus with images, etc.

Is this just weird behavior from the debug menu?

Rod Stephens January 23rd, 2011 10:06 AM

I think this is buggy behavior in Visual Studio. Unfortunately I don't know of a sure-fire way to fix it. Some things you might try:

- Close and reopen the project. Sometimes this works, particularly if you have images that don't seem to display properly. (Fairly often when I add an image to a control, the image doesn't appear. Closing and reopening often fixes that problem.)

- Select the MenuStrip, press [Ctrl]+X to cut it to the clipboard, and press [Ctrl]+V to paste it back.

- Start a new project and use copy and paste to copy the MenuStrip to the new project.

- Start over.

If you open the designer-generated file behind the form, there's a chance you can figure out what is wrong, but that can be tricky so I wouldn't recommend it unless you're pretty sure you can't salvage the project and you just want to poke around in there.

Sorry I don't have a better answer.

All times are GMT -4. The time now is 12:48 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.