contextmenustrip is currently opened?

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
481
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:

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,283
Location
Sydney, Australia
Programming Experience
10+
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.
 

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
481
Programming Experience
3-5
Visible is the one, thanks.
 
Top Bottom