I want to disable shortcuts in a menu. This dont work. Even though I dont have any shortcutkeys it automatically chooses the first letter in every menuitem. This I dont want. I found very little about this on the net. Below is a link where they finally concludes it with that there is a bug in vb.net. I have a whole lot of buttons with shortcutkeys that I really need and its pretty anoying that it ignores them and just open menues where I dont have any shortcutkeys.

This dont work eather:
FiskToolStripMenuItem.ShortcutKeys = Keys.None

This is what I have found so far, but it cant be possible...
http://social.msdn.microsoft.com/Forums/en/winforms/thread/c5b3eb02-0aa0-485c-bb67-2a053a19f40c

Please help!

Recommended Answers

All 4 Replies

I haven't tried this myself but could you use KeyPreview on the form to detect and ignore all Alt key press events?

I haven't tried this myself but could you use KeyPreview on the form to detect and ignore all Alt key press events?

Hi,
I want the Alt+"a key" to work on my buttons. Even if I catch the Alt+"a key" as you say it still opens the menu. Even though I say button.focus()...

The problem is that you are trying to change standard windows behavior which is not good for the usability of your program, people will find it difficult to learn and use if it does not behave in an expected manner. Perhaps you can think about an alternative approach to achieving your objective.

The problem is that you are trying to change standard windows behavior which is not good for the usability of your program, people will find it difficult to learn and use if it does not behave in an expected manner. Perhaps you can think about an alternative approach to achieving your objective.

It is not standard for windows to have shortcutkeys that you cant see, that in fact is really bad usability.
There is no key underlined in the menu items and I have never seen that behavior during my 13 years working with microsoft development.

I have now put back all the shortcutkeys in the menu that I had from the beginning and taken off shortcutkeys from buttons so there will be no missunderstanding with the user. The problem is now the user cant reach a few buttons with shortcuts but will have to tab to the button. Its a really big problem where I work due to that we have high requirements regarding usability.
Thanks for your help though!

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.