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

C# Hotkeys

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 appropriate underscore while
in design mode BUT DOES NOT appear at Runtime.

At runtime the Hotkey functionality works, but the
relevant underscores do not appear. For example, I have a
buttonStart.Text = "&Start". At Runtime, the button
displays as "Start" and pressing "S" triggers the event.

Is this a bug? Or is there an obvious solution I have
overlooked. I do have KeyPreview = true.

Any suggestions would be greatly appreciated!
Thanks,
Jason
Nov 15 '05 #1
2 14298
It depends on your System Accessibility settings. Sometimes hot keys are
not displayed until you press "Alt" key. You can change the behavior in
Display Settings->Appearance->Effects (on XP)

-vJ
"Jason Duncan" <ja*************@yahoo.com> wrote in message
news:05****************************@phx.gbl...
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 appropriate underscore while
in design mode BUT DOES NOT appear at Runtime.

At runtime the Hotkey functionality works, but the
relevant underscores do not appear. For example, I have a
buttonStart.Text = "&Start". At Runtime, the button
displays as "Start" and pressing "S" triggers the event.

Is this a bug? Or is there an obvious solution I have
overlooked. I do have KeyPreview = true.

Any suggestions would be greatly appreciated!
Thanks,
Jason

Nov 15 '05 #2
Thanks VJ.

You are correct, and this fixed the problem.

Right-Click Desktop...
Properties->Display settings->Appearance->Effects (on XP)
Uncheck the "Hide keyboard navigation indicators until I
use the Alt key" box.

Underscores now appear for the appropriate Hotkeys.

Jason
Nov 15 '05 #3

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

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: 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,...
2
by: =?Utf-8?B?SXZvODY=?= | last post by:
Hi, I need ot set hotkeys to my windows application. I want when Word is thea active application and when user press "Ctrl+Alt+T" for example to start my action. I used RegisterHotKey and...
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
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.