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 18:14:08
 
 
À
01/07/2004 14:58:08
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00919447
Message ID:
00919907
Vues:
8
Follow-up... I got this to work. Again, I don't work in VB, so if there's a better way to code this, feel free to comment...but it does work.
Public Class Class1
    Inherits System.Windows.Forms.TextBox
      Public Sub New()
        AddHandler Me.KeyDown, AddressOf OnKeyDown
    End Sub

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

End Class
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform