Private Sub txtStart_KeyPress(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyPressEventArgs)
Dim txtW As TextBox = sender
Dim KeyAscii As Short = Asc(e.KeyChar)
KeyPressNumberMinus(txtW, KeyAscii)
If KeyAscii = 0 Then
e.Handled = True
End If
End Sub
Sorry, I actually need to trap the keypress from a ComboBox. Where simply placing e.handled=true in the keypress works for a textbox-- does not work for a combobox.
Private Sub ComboBox1_KeyPress(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyPressEventArgs) _
Handles ComboBox1.KeyPress
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.