Private Sub TextBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown If e.KeyCode = Keys.Back Or e.KeyCode = Keys.Delete Then e.SuppressKeyPress = True End If End Sub
Private Sub TextBox1_PreviewKeyDown(sender As Object, e As System.Windows.Input.KeyEventArgs) Handles TextBox1.PreviewKeyDown If e.Key = Key.Back Then e.Handled = True End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)