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
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