473,404 Members | 2,137 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,404 software developers and data experts.

More on Hotkeys

I have a C# WinForm application (.net 2.0).
I use the '&' character for Hotkey access on various buttons.
With the <Display Properties / Effects / Hide Keyboard Navigation Indicators> unchecked, the Hotkeys display just fine.

The problem is that I have text containing the '&' character displayed in some controls on different forms. That text now displays with underlines instead of the '&' character (example: B&B displays as BB with the second B underlined).

Is there a way to programatically turn off the '&' hotkey behavior?

Thanks for any help you can give.
Oct 17 '07 #1
2 1070
Plater
7,872 Expert 4TB
I *think* maybe a "\&" will work?
When you use the & in menus/buttons it makes the following character be the shortcut key (like you said)

I am pretty sure that you can either do && or \& to get around it
Oct 17 '07 #2
I *think* maybe a "\&" will work?
When you use the & in menus/buttons it makes the following character be the shortcut key (like you said)

I am pretty sure that you can either do && or \& to get around it
Thanks Plater. It's a bit complicated by the fact that I'm using DataBinding to link the Text property of the Label control to a DataColumn. I'm not sure how to "pre-process" the data coming from the column to replace any "&" characters with "\&". I had already tried your suggested replacement in both the Paint and Validating events for the Label, but neither worked. Maybe I need to use something other than a Label control.
Oct 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: skumar | last post by:
I need to access the Tabpages by hotkeys "alt+P" in case of "Principals" as one of the Tabpage. Also i need to underline the word "P" in "Principals" so that user is informed about the hotkey.If...
2
by: Hasan Ammar | last post by:
Is it possible to set up hotkeys using onkeypress? I know it can be done with the usual alphanumeric keys, but what about function keys? or using ctrl/alt combinations? Does anybody have a...
1
by: Matthew Wells | last post by:
How do you prevent someone from using Ctrl+, (ctl + comma) or Ctl + . (Ctl + perios) to get to design view. I have all the normal properites turned off (Access special keys, F!!, etc) but nothing...
3
by: Matthew Wells | last post by:
I'm reposting because an idiot replied without reading the whole message. I've tried autokeys and it isn't working for this combination. Please read on. While in form view, how do you prevent...
2
by: Jason Duncan | last post by:
I have a C# WinForm application (.net 1.0). On my Menu and Buttons I use the '&' (in the .Text properties) for Hotkey access. No biggie. The strange behavior is that the '&' is converted to the...
2
by: Martin Hjärtmyr | last post by:
I have a program that uses Hotkeys! And they works just fine! I use this hotkeylib:...
3
by: Bernd Eichelsdorf | last post by:
Hi, I would like to add hotkeys to my webapp - it's running on a barcode scanner, that has got a number pad and the keys F1 - F4. I would like to add hotkeys, so that when the user presses F1,...
0
by: Octavius Khan | last post by:
How can I set system hotkey that will only work for specific applications. For example, I have a system tray application that uses hotkeys to perform certain tasks like placing text into a memo...
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?
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.