If e.KeyCode = Keys.Enter Then
e.Handled = True
...
End If
If e.KeyChar = vbCr Then
e.Handled = True
...
End If
If e.KeyChar = Chr(13) Then ' Same as above
e.Handled = True
...
End If
J.
--
The email address listed is not my real address. Please do not send
valid email to that address.
Derive your own Control from NumericUpdown and add this code:
Protected Overrides Sub OnTextBoxKeyPress( _
ByVal source As Object, _
ByVal e As System.Windows.Forms.KeyPressEventArgs)
If e.KeyChar = Chr(13) Then
e.Handled = True
Else
MyBase.OnKeyPress(e)
End If
End Sub
--
Armin
How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html