Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What do I use to allow Enter or Tab to exit text control
Message
From
01/07/2004 18:14:08
 
 
To
01/07/2004 14:58:08
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00919447
Message ID:
00919907
Views:
10
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
Previous
Reply
Map
View

Click here to load this message in the networking platform