By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

textbox reversing text

P: n/a
I am using the following code in a textbox:

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TextBox1.TextChanged

Dim txt As TextBox = CType(sender, TextBox)

txt.Text = txt.Text.ToUpper

End Sub

If I type in the word "the" it upper cases it but reverses "the" to "eht"

It is the ToUpper that causes this but how to correct it?

thanks

barry


Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"barry" <fl******@ix.netcom.com> schrieb:
I am using the following code in a textbox:

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TextBox1.TextChanged

Dim txt As TextBox = CType(sender, TextBox)

txt.Text = txt.Text.ToUpper

End Sub

If I type in the word "the" it upper cases it but reverses "the" to "eht"

It is the ToUpper that causes this but how to correct it?


Set the textbox's 'CharacterCasing' property to 'Upper'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

P: n/a
That did it
thanks
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uS**************@TK2MSFTNGP15.phx.gbl...
"barry" <fl******@ix.netcom.com> schrieb:
I am using the following code in a textbox:

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

Dim txt As TextBox = CType(sender, TextBox)

txt.Text = txt.Text.ToUpper

End Sub

If I type in the word "the" it upper cases it but reverses "the" to "eht"
It is the ToUpper that causes this but how to correct it?


Set the textbox's 'CharacterCasing' property to 'Upper'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.