Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I've been having issues with my backspace coding. It removes the last character in the sequence like it should but when I hit another key, the previously deleted character comes back.This is my coding so far.

Private Sub ButtonBackspace_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonBackspace.Click
        Try
            If MaskedTextBox1.Text.Count > 0 Then
                MaskedTextBox1.Text = MaskedTextBox1.Text.Remove(MaskedTextBox1.Text.Count - 1)
            End If
        Catch ex As Exception
        End Try
    End Sub
Posted
Comments
_Maxxx_ 29-Oct-13 23:23pm    
I was intrigued so tried this out - in C# not VB - and all was well.
Are you sure there isn't some other process going on that is updating the text box?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900