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 14:58:08
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00919447
Message ID:
00919793
Views:
9
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform