contextmenustrip is currently opened?

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
520
Programming Experience
3-5
How do i tell if a contextmenustrip is currently opened? I am trying to put a .close of the menustrip if its opened in the mousewheel event. right now i just have it always close on wheel.
 
Last edited:
I don't think that there's a property that will tell you directly. I haven't tested to find out but Visible may do it for you. There may be other options too, like Focused or maybe other indirect options, like Location. You'd have to do some testing to see what works and what doesn't.

Failing all that, you can maintain your own Boolean variable, changing its value on the Opened and Closed events of the menu.
 
Back
Top