menu item shortcuts...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using VS .NET 2003, VB:
I want to assign two different menu items the same shortcut, having only one
enabled at a time... is this possible?

In the forms designer, I have assigned both menu items the same shortcut...
the 1st menu item is visible and enabled, the second is invisible and
disabled. Based on some event, I toggle when menu item is visible and
enabled... but when I test this funcatinality, the visible/enabled changes
work but the only the first menu item ever responds to the shortcut.

Any suggestions on how to deal with this... (only thing I have come up with
is to add logic in under the 1st control to determine which when to perform
action1 or action2)

Thanks for your attention to this matter...
Charles
 
Whenever you toggle the enablement and visibility of the second menu item,
set and unset the shortcut in the first menu item's Text property so as to
remove it when menu item 2 is enabled and visible.

Tom Dacon
Dacon Software Consulting
 
Thanks for the suggestion

Tom Dacon said:
Whenever you toggle the enablement and visibility of the second menu item,
set and unset the shortcut in the first menu item's Text property so as to
remove it when menu item 2 is enabled and visible.

Tom Dacon
Dacon Software Consulting
 
Back
Top