How find e.Keychar values
The following worked for me:
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As
Debug.WriteLine("Keydown " + e.KeyValue.ToString)
If e.KeyCode = Keys.Insert Then
Which keys are you interested in intercepting? You can intercept most keys
in the KeyDown event, but some get grabbed at the form level. For those
you need to use stronger methods. Take a look at the following article
320583 HOW TO: Trap Keystrokes in .NET Controls by Using Visual Basic .NET
Microsoft Visual Basic Team
This posting is provided AS IS with no warranties, and confers no rights.
(c) 2003 Microsoft Corporation. All rights reserved.
| Subject: Re: How find e.Keychar values
| Date: Wed, 2 Apr 2003 15:27:15 -0800
| Lines: 16
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| I see that if I type Keys. in my code editor I get a list of keys. Very
| helpful. But that doesn't tell me how to use it. I tried
| If e.KeyChar = Insert then
| If e.KeyChar = Keys.Insert then
| But, of course, these don't work.
| What am I missing?
| Thanx in advance.