[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • Last Modified:

ContextMenustrip Double Click Handler

I have a dynamically created ContextMenuStrip  that I am creating click handlers for        

 AddHandler reportsContextMenuStrip.ItemClicked, AddressOf cMenu_Click  << Works Fine

I am trying to create either a double click or preferable  a right mouse click (opposite Mouse Click)
 
 AddHandler reportsContextMenuStrip.MouseDoubleClick, AddressOf cMenuDouble_Click  <<-- Does not seem to fire

Please any help is appreciated
0
Charles Baldo
Asked:
Charles Baldo
1 Solution
 
Jacques Bourgeois (James Burger)Commented:
You cannot react to most events on a ContextMenuStrip, because the ContextMenuStrip itself is never visible.

What is visible to the user are the ToolStripMenuItem controls that the ContextMenuStrip contains. And the ToolStripMenuItem does not have a MouseDoubleClick, it has a only a DoubleClick.
0
 
Charles BaldoSoftware DeveloperAuthor Commented:
James,

Thank you what I ended up doing was the mouse event with right and left then save the results to a global variable and work it form there

WPF is the best answer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now