Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What do I use to allow Enter or Tab to exit text control
Message
De
01/07/2004 14:58:08
 
 
À
30/06/2004 23:08:45
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00919447
Message ID:
00919793
Vues:
8
I'm not a C programmer so I'm converting that code to VB.

I created a new class in the project with the following code:

Public Class ccTextBox
Inherits System.Windows.Forms.TextBox
Public Sub New()
Me.KeyDown = New KeyEventHandler(OnKeyDown)
End Sub

Public Sub OnKeyDown(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyEventArgs)
If e.KeyCode = Keys.Enter Then
SendKeys.Send("{TAB}")
End If
End Sub

End Class

But this is giving me an error on 'Me.KeyDown' and 'New KeyEventHandler(OnKeyDown)'

Should I be importing something here?

Thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform