473,387 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

menu item shortcuts...

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
Sep 13 '05 #1
2 1701
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

"hz****@nopost.com" <hz*************@discussions.microsoft.com> wrote in
message news:D2**********************************@microsof t.com...
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

Sep 13 '05 #2
Thanks for the suggestion

"Tom Dacon" wrote:
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

"hz****@nopost.com" <hz*************@discussions.microsoft.com> wrote in
message news:D2**********************************@microsof t.com...
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


Sep 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: bigbuddha | last post by:
I have found this nice little menu. http://www.bigbuddha.be/test/menu.html When i click on "folknieuws" there is only 1 item, so i dont need it to expand just open a page in an another frame. So...
7
by: cefrancke | last post by:
I cant seem to find a straight answer on the following. I want to programmatically hide all menus except a basic custom report menu (during report preview) and right click pop-up A-Z sorting on...
4
by: Aaron Queenan | last post by:
How can I use the designer to add a context menu to a class which inherits from a control, e.g. treeview, without adding the context menu to a form? For example, to add a context menu with...
0
by: Larry Serflaten | last post by:
I'd like to have a button on my form that will show a menu from the user's Programs tree (off the Start button). I want it to be the same menu the user sees when they traverse their own Programs...
2
by: PadPad | last post by:
How to create the menu shortcuts for the menu item.
2
by: Pad | last post by:
How to create new shortcuts key in order for the user to access it. for example I want to create ctrl+f for the File menu. How can I do this???
2
by: hzgt9b | last post by:
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...
0
by: Fredrik Melin | last post by:
I dont know if its the framework or the fact that I am using MenuStrip nowadays but If you have a textbox highlighted (active control), menu shortcuts dont work anymore. My textboxes is readonly...
2
by: andylotus | last post by:
Hi People I have a WinForm program. The UI contains a ToolStripDropdownButton, which is associate a list of menu items of ToolStripMenuItem, created dynamically. Upon different scenarios of user...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.