Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hot Key on button and get keypress event howto
Message
From
23/01/2005 19:58:48
 
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00979867
Message ID:
00979892
Views:
41
Well, I got it only partially right. You wanted the buttons to work with ctrl, not alt ... and I forgot about the underline not showing up until you hit the alt key with XP and 2000.

Don't you just love how they say "it's a new feature"? I think someone introduced a bug and they didn't want to admit it. <g> Why the heck should you *have* to press alt first in order for the underline to show? Oh well ...

~~Bonnie




>I have found the cause of this behavior, it is descriped on the following website : http://support.microsoft.com/default.aspx?scid=kb;EN-US;843329
>
>Cause:
>
>This property has been changed in Microsoft Windows Server 2003, Microsoft Windows XP, and Microsoft Windows 2000. This is a new feature. These operating systems disable the underline format for the letter key in a keyboard shortcut until you press ALT. When you press ALT, you will notice that the letter key appears correctly.
>
>
>With Alt + ShortcutKey the button's method gets executed.
>
>Thanks Bonnie.
>
>
>>Bonnie,
>>
>>I preceded the S and V character with "&" the buttons in the button's text property, in the form designer the first character gets underlined. Strange thing is when I run the form the underline doesn't show anymore, moreover "ctrl+V" ,"ctrl+ S" don't fire anything.
>>
>>Do you happen to know if I have to do anything additional or if I am doing something wrong?
>>
>>Thank you.
>>
>>
>>
>>>Zakaria,
>>>
>>>Precede the S and the V with the "&" character.
>>>
>>>~~Bonnie
>>>
>>>
>>>>Hello All,
>>>>
>>>>I have a form with two buttons : "Save" and "View". I want to create Hot keys for these bottons such that if I press on ctrl +s the save button click method gets fired and Ctrl + v the View button click method gets fired.
>>>>
>>>>How could this be done?
>>>>
>>>>
>>>>Thank you.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform