473,386 Members | 1,799 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,386 software developers and data experts.

Shortcut Key Not Underlined

I'm creating a main menu in C#. When I put an ampersand (&) ahead of a
character in a menuitem name, the following character is underlined, as
expected, in the design view.
When I run the app however, the behavior is not as expected: the underline
does not show until I hit the Alt key. Is this normal? Note that Visual
Studio itself does not behave this way. All of the underlines show whether
the Alt key is pressed or not.
Is there a form or menuitem property to control this behavior?
Thanks in advance for the help,
Dennis
Nov 17 '05 #1
3 9166
Sounds like the system setting. Go to your "Display Properties", in the
Control Panel, and under the "Effects" tab you should see "Hide keyboard
navigation indicators until I use the Alt key". Uncheck this option. Note
that I am using a Windows 2000 Pro OS but I'd imagine that XP wouldn't be
too much different.

--
Tim Wilson
..Net Compact Framework MVP

"db_from_mn" <db******@discussions.microsoft.com> wrote in message
news:99**********************************@microsof t.com...
I'm creating a main menu in C#. When I put an ampersand (&) ahead of a
character in a menuitem name, the following character is underlined, as
expected, in the design view.
When I run the app however, the behavior is not as expected: the underline
does not show until I hit the Alt key. Is this normal? Note that Visual
Studio itself does not behave this way. All of the underlines show whether
the Alt key is pressed or not.
Is there a form or menuitem property to control this behavior?
Thanks in advance for the help,
Dennis

Nov 17 '05 #2
Hello Tim,
Thanks! You nailed it!
It took me awhile to find the setting in XP Pro, but when I unchecked it,
then my app worked as expected.
This begs the question however, as to how VS gets around this. As I
indicated in my original question, Visual Studio did display the underlines,
even when the Alt key was not pressed.
Maybe there is a programmatic way to override the system setting?
Thanks again,
Dennis

"Tim Wilson" wrote:
Sounds like the system setting. Go to your "Display Properties", in the
Control Panel, and under the "Effects" tab you should see "Hide keyboard
navigation indicators until I use the Alt key". Uncheck this option. Note
that I am using a Windows 2000 Pro OS but I'd imagine that XP wouldn't be
too much different.

--
Tim Wilson
..Net Compact Framework MVP

"db_from_mn" <db******@discussions.microsoft.com> wrote in message
news:99**********************************@microsof t.com...
I'm creating a main menu in C#. When I put an ampersand (&) ahead of a
character in a menuitem name, the following character is underlined, as
expected, in the design view.
When I run the app however, the behavior is not as expected: the underline
does not show until I hit the Alt key. Is this normal? Note that Visual
Studio itself does not behave this way. All of the underlines show whether
the Alt key is pressed or not.
Is there a form or menuitem property to control this behavior?
Thanks in advance for the help,
Dennis


Nov 17 '05 #3
I believe that VS.Net uses a completely custom drawn menu. Whoever created
that menu probably overlooked this "feature" or didn't care to implement it.

--
Tim Wilson
..Net Compact Framework MVP

"db_from_mn" <db******@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com...
Hello Tim,
Thanks! You nailed it!
It took me awhile to find the setting in XP Pro, but when I unchecked it,
then my app worked as expected.
This begs the question however, as to how VS gets around this. As I
indicated in my original question, Visual Studio did display the underlines, even when the Alt key was not pressed.
Maybe there is a programmatic way to override the system setting?
Thanks again,
Dennis

"Tim Wilson" wrote:
Sounds like the system setting. Go to your "Display Properties", in the
Control Panel, and under the "Effects" tab you should see "Hide keyboard
navigation indicators until I use the Alt key". Uncheck this option. Note that I am using a Windows 2000 Pro OS but I'd imagine that XP wouldn't be too much different.

--
Tim Wilson
..Net Compact Framework MVP

"db_from_mn" <db******@discussions.microsoft.com> wrote in message
news:99**********************************@microsof t.com...
I'm creating a main menu in C#. When I put an ampersand (&) ahead of a
character in a menuitem name, the following character is underlined, as expected, in the design view.
When I run the app however, the behavior is not as expected: the underline does not show until I hit the Alt key. Is this normal? Note that Visual Studio itself does not behave this way. All of the underlines show whether the Alt key is pressed or not.
Is there a form or menuitem property to control this behavior?
Thanks in advance for the help,
Dennis


Nov 17 '05 #4

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

Similar topics

27
by: aa | last post by:
Thought this question might be out of this NG's scope, there are always knowledgable people who might hava an answer. A hyperlink to a shortcut to a file returnes an empty screen, and the source...
0
by: Frank Jiang | last post by:
Does anybody know how to underline in a tabcontrol's tab, as in VB6 &Cancel will show a shortcut underlined "C". I've created a shortcut by using form event handler. I need to show some sign on...
2
by: AlanF | last post by:
We have defined access keys for both our menu choices and buttons. However, when the menu displays, the access key "underline" on the menu does not display until we press the ALT key. We can toggle...
2
by: cbielich | last post by:
This is what I am asking In many programs there are buttons that have a letter underlined, and when pressing Alt & the underlined letter then you will activate that button. For instance and...
4
by: Salad | last post by:
A97. If you set a forms properties to ShortcutMenu = No, the entire form is disabled from displaying a shortcut menu. If you set the property to Yes, all controls have a shortcut menu. I have...
1
by: jez123456 | last post by:
I've setup the text on a forms button as &Save. The S is underlined correctly in design view, however when I run the project, the S is not underlined until I press the Alt key.
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
2
by: AA Arens | last post by:
Some button text in the switchboard items consisits of a underlined character, to access it with ALT-.... How to have this dismissed as I don't want to use it? Bart Acc 2003 but databse is from...
1
by: =?Utf-8?B?Um9iIE11dGNoZWs=?= | last post by:
I have reinstalled Visual Studio 6.0 and service packs and am programming in VB 6.0 on XP machine. Since re-install of Visual Studio any shortcut keys created on menus using the & character fail to...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.