Question uppercase or lowercase

Rainny

Member
Joined
Jun 9, 2008
Messages
16
Programming Experience
Beginner
Hi, everyone. Does anybody know when the user key in the uppercase or lowercase letter into a text file, then the program can read whatever they key in? It also means that the program wouldn’t care what the user key in, and don’t care about the case sensetive but it still can read the value. Can anybody provide the sample coding for it? Thanks you.
 
Im quite new at Vb myself but i think u can either set the textbox to input everything as upper case in the txtbox properties window, or use :
Dim input As String
Ucase(input) 'change to uppercase
 
Im quite new at Vb myself but i think u can either set the textbox to input everything as upper case in the txtbox properties window, or use :
Dim input As String
Ucase(input) 'change to uppercase

Yes you can, if all data that's going to be typed into the TextBox needs to be in all uppercase you can actually use the KeyPress event of the TB to change all letters to their uppercase letter.

Something like this:
VB.NET:
Private Sub TextBox1_KeyPress(...) Handles TextBox1.KeyPress
  e.KeyChar = CChar(e.KeyChar.ToString.ToUpper)
End Sub
I don't have the VB IDE with me right now, so the code above may not be the 100% correct code.
 
Back
Top