When i am pressing any key in the textbox it will return "A" Character.
Code sample:
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
e.KeyChar = "A"
End Sub
so i want to get multiple character. how to get?
code sample:
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
e.KeyChar = "AB"
End Sub
the above coding not working. the e.keychar get only one character that is "A" only return. How to get all the characters.
KeyPressreports that the user pressed a single key. "AB" is not a key, so this won't work. What is it you're trying to accomplish? It is likely thatTextChangedis what you're looking for.