Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2010 Problem with Button dropdown menu

$
0
0
hi,

I make a dropdown menu using button and contextmenustrip, everytime I click the button it will show the contextmenu
I want to make when I click the button it will show and hide the contextmenu

like the first click it will show, then the second click it will hide
I can do it using Boolean to the button so the first click is true the second click is false , to make show and hide contextmenu
the problem is when I click other things beside the button it will also hide the contextmenu without change the boolean

so I have to click to 2 times before I can show the contextmenu again
example: I click the button then the contextmenu show, the boolean is true. I click everywhere in the form, it will close the contextmenu but the boolean still true so I have to click the button to change the boolean to false and true again to show the contextmenu again..

so please help me.. is there any better way to make the button can show and hide the contextmenu without have any problem when i click everywhere in the form

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>