Hello

I want to know if is it possible to avoid the pop-up of a contextmenustrip (below mentionned as ctxs)

Explaination :

In a Picture Box I've defined a ctxs
Mousedown right doesn't display it
Mouseup right display it

I want to avoid the display if during the mouse down the user made a signifiant mouse move

Any idea ?

You can set the contextmenu args e.Cancel = true to prevent the menu from appearing. If you cause a "significant" mouse movement, you need to set a variable so that in the contextmenu Opening event, it can be checked, and prevented from displaying if the variable is true. Always set this variable to false when entering the picturebox, or on the initial right mouse click event.

Hope this helps,
Jerry

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.