473,671 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

textbox reversing text

I am using the following code in a textbox:

Private Sub TextBox1_TextCh anged(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles TextBox1.TextCh anged

Dim txt As TextBox = CType(sender, TextBox)

txt.Text = txt.Text.ToUppe r

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
2 1559
"barry" <fl******@ix.ne tcom.com> schrieb:
I am using the following code in a textbox:

Private Sub TextBox1_TextCh anged(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles TextBox1.TextCh anged

Dim txt As TextBox = CType(sender, TextBox)

txt.Text = txt.Text.ToUppe r

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 'CharacterCasin g' 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
That did it
thanks
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:uS******** ******@TK2MSFTN GP15.phx.gbl...
"barry" <fl******@ix.ne tcom.com> schrieb:
I am using the following code in a textbox:

Private Sub TextBox1_TextCh anged(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles TextBox1.TextCh anged

Dim txt As TextBox = CType(sender, TextBox)

txt.Text = txt.Text.ToUppe r

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 'CharacterCasin g' 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
4315
by: kfrost | last post by:
I know this is probably simple but I have a C# form and the class for the form is called sbaSynch. I have a textbox name txtServerName. I'm creating a class to manipulate XML functions so I added a class to project and it's named XmlApi(). In the XmlAPI() class I have simple code as following XmlAPI() { string str = "Some Text";
7
2115
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if anyone can tell me how I should properly cast the following: (TextBox)UserPrefix=(TextBox)e.Item.Cells.Controls; string strUserPrefix=UserPrefix.Text; I keep getting the following error and I don't know why because I have declared the UserPrefix as a textbox using "protected...
2
19853
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
11
8066
by: Tim Marshall | last post by:
I use Terry Kreft's & Stephen Lebans colour dialog procedures for users to pick colours for various control properties in certain apps. Is there a way to take the colour code that is displayed in a backcolor/forecolor/etc property and calculate the "reverse colour"? In other words, If a user picks 255 (red) for a control backcolor, I'd like to be able to calculate the opposite or negative of that colour and assign the control's...
7
1695
by: Jason | last post by:
I have created a user control, MyControl.ascx, that has a text box and a button. The button updates a table in SQL with the text in the textbox. Now, I include that control in a page Default.aspx. From Default.aspx, on page load, I populate the textbox through the public property TextBoxBody of MyControl.ascx. When I load Default.aspx and change what's in the text box and click the button to update the database, the update statement...
4
2706
by: hello12 | last post by:
Hello, I am new to java and i was having a hard time figuring out on how to do certain string manipulations. I was asked to read in a text file and reverse the words. So far, I have put all the words in the text file into an arraylist. For example... Hello World. ---> must be printed out as --> olleH .dlroW right now when i print my arraylist i am getting I was thinking of somehow...
0
2396
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile View I want the form populated from there profile on the sql server. The code to save the profile works fine. But when the user logs back in they data doesn't load back to the form. The multiview is located inside the LoginView's Logged-In View ....
8
4755
by: arnuld | last post by:
i have created a solutions myself. it compiles without any trouble and runs but it prints some strange characters. i am not able to find where is the trouble. --------------------------------- PROGRAMME -------------------------------- /* K&R2 section 1.9 exercise 1.19
4
3061
by: d1srupt3r | last post by:
I am developing my form into a captcha secured form and I used header() function if the user didn't put the verification code properly and still when the user go back to the form page the filled he have filled have still remained. In addition, users are usually submitting multiliner texts in the textbox so I used the str_replace() function to make all \n into %n% to prevent an error in the header function whenever the form is submitted. my...
0
8911
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8819
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.