Link to home
Start Free TrialLog in
Avatar of BlakeMcKenna
BlakeMcKennaFlag for United States of America

asked on

ToolStripMenuItem not opening up?

I recently made some changes to an Windows App. The problem I'm having is that a ToolStripMenuItem (TSMI) won't even open when I click on it. I have done nothing to the code that would affect this. The The weird thing is this just started. It was working yesterday and now all of the sudden it's not. Obviously I've done something but have NO idea what. The TSMI is enabled and visible. I don't know what could prevent it from opening up unless it was disabled?

Thanks!
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Try doing a Clear Solution by going to the main menu of the IDE and clicking on the Build -> Clear Solution. The project may have gotten out of sync with the code. Then re-compile the solution and see if it helped.
Avatar of BlakeMcKenna

ASKER

Fernando,

I tried that and it didn't help. This is so weird. I have no idea what I did to make it do that. I thought that whenever you click on a menu item, it should always open up if it has child menuitems?
Have you tried placing a break point in the click event of the menu strip to see if it even gets there?
For this particular menu item, there is no click event.
A MenuStrip contain ToolStripMenuItems which both have Click events, although you may not have a need to define one yet.

In design mode are you able to open the MenuStrip and see the ToolStripMenuItems? Also go into the Properties window for the MenuStrip and make sure it is not disabled,  Enabled = False, for the top menu that is not opening.

I will be leaving in a little while and if you have not been able to get pass this issue and if you can zip up the project and upload it to a web location that I can download it, I will take a look at it sometime over the weekend.
I am able to open the MenuStrip and the Enabled Property is set to "True"...

Unfortunately, I cannot send you the project...company policy!
ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Fernando,

I figured it out. It had to do with the fact that I designed this menu to be driven by the database based on user's permissions. I realized that the I had to submenu items that were not in the database which is why when I clicked on the Menu Item, nothing happened. It's because the sub Items weren't there. That was an easy fix. Just took way to long to figure it out!!!

Thanks for your help!
I figured it out. It had to do with the fact that I designed this menu to be driven by the database based on user's permissions. I realized that the I had to submenu items that were not in the database which is why when I clicked on the Menu Item, nothing happened. It's because the sub Items weren't there. That was an easy fix. Just took way to long to figure it out!!!
Well glad you got through your issue. Have a great weekend.
Thanks...you do the same!