views:

261

answers:

2

In a Windows Forms, .NET 2.0 application, I'm using a ContextMenuStrip control attached to the ContextMenuStrip property of a form. When I right-click the form, the ContextMenuStrip opens at the mouse cursor position.

However, when I press the "menu key" on my keyboard, the ContextMenuStrip does not open at the mouse cursor position, it opens at the same location somewhere in the bottom-right quarter of the form. Is this a standard behavior and why?

How can I write code to change this behavior and make the ContextMenuStrip pop-up at the mouse cursor position when I press the "menu key"?

A: 

It is standard behavior. Try using the key in any other application. It completely ignores the mouse location.

I would avoid overriding standard behavior. Keyboard users won't be impressed that all they menus are popping up wherever they last left their mouse.

tster
A: 

I think that's normal behavior. Try pressing the Menu key in this window ;-)

Shoban