By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,775 Members | 1,345 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,775 IT Pros & Developers. It's quick & easy.

ContextMenu causing strange Exception

P: n/a

Hi,

I have a strange problem in one of my applications.

It occurs after I show a second form from my main form. When I close the
second form, and re-show the main form I sometimes get an unhandled
exception error with the message:
'Context Menu cannot be shown on an invisible control'
My Main form contains 2 context menus. Neither of these is opened
manually in code (ie they are assigned to the Contextmenu property of
controls)

None of the options on these 2 menus open the second form, and even if
they did, I thought a contextmenu was supposed to close after a menu
item was clicked.

I am having major problems trying to debug this, because I just don't
know where I could possibly put a breakpoint, or even where I could put
an exception handler to trap this.

Has anybody got any idea of what could possibly cause this, or some idea
of where to start looking?
I am using c# in VS2005
Thankyou
Paul
Feb 5 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.