Hi all, just wondering what I'm doing wrong here? I'm a bit stumped
You can see I'm trying to change a "m" to "Male" and "f" to "Female".Code:Private Sub txt_Quick_Gender_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_Quick_Gender.KeyPress If e.KeyChar = "m" Then txt_Quick_Gender.SelectAll() txt_Quick_Gender.Text = "" txt_Quick_Gender.Clear() txt_Quick_Gender.Text = "Male" ElseIf e.KeyChar = "f" Then txt_Quick_Gender.SelectAll() txt_Quick_Gender.Text = "" txt_Quick_Gender.Clear() txt_Quick_Gender.Text = "Female" End If End Sub
I've even put in .text = "" and the .SelectAll() and still it comes out like this:
OUTPUT:
mMale
or
fFemale
I'm a bit stumped
Any help really appreciated...
Rob






Reply With Quote