How do I control when a contextMenuStrip is displayed?

Posted by GregH on Stack Overflow See other posts from Stack Overflow or by GregH
Published on 2010-04-09T14:28:17Z Indexed on 2010/04/09 14:33 UTC
Read the original article Hit count: 331

Filed under:

In (2008), I want to be able to control when a contextMenuStrip (context menu) is displayed. I don't want it to always appear when the right mouse button is clicked...only when certain criteria within my program are met. I figure I would use addHandler but I'm not exactly clear on how to completely control the opening of the contextMenuStrip. I know I would issue a call to the "open" method to render the contextMenuStrip. However, I am unclear as to how to completely take over control of when to render the contextMenuStrip.

© Stack Overflow or respective owner

Related posts about

Related posts about .NET