Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
KeyPress event
Message
De
12/01/2004 12:22:21
 
 
À
12/01/2004 10:57:33
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Divers
Thread ID:
00865977
Message ID:
00866030
Vues:
25
Jim,

Use Systems.Windows.Forms.Keys ... it has properties for a lot of the "special" keys.

~~Bonnie



>Rex,
>
> On the main Window of the application I have a treeview. I want to program the ability to refresh the treeview when the user hits F5 on the keyboard. There is not an ascii code for this key. If I create a menu option that uses the F5 key when the treeview has focus nothing happens, but if another form has focus and I hit the F5 key I get the results I want to. How do I get the F5 key to work from the treeview?
>
>Jim
>
>>>Rex,
>>>
>>> Thanks for the response. If the 13 an ascii keycode? Where would I find those?
>>>
>>>Jim
>>>
>>>>>All,
>>>>>
>>>>> I am writing a Windows application and need to trap keys being pressed. I know there is a keypress event but am unsure how to determine which key is pressed. How would I do this?
>>>>Hi Jim,
>>>>
>>>>We use the following example
>>>>
>>>>// If the enter key is pressed
>>>>if (e.KeyChar == (char)13)
>>>>{
>>>> this.btnOK.PerformClick();
>>>>}
>>Jim,
>>
>>Just do a search in the help for Ascii Codes. The page title is ASCII Character Codes. It will give you two pages.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform