making a letter uppercase

Hi!!!

I want to convert to uppercase every character the user input in a masked text box. How Can I do this

Thanks for the help.

Jose Eloy
Mexico



Answer this question

making a letter uppercase

  • Chuck Cobb

    The string class implements a method called ToUpper() that returns a copy of the original string with all the characters converted to upper case. 

    The Textbox class implements a Text property of type string that gives you access to the contents of the text box. 

    Combine these two and you should get what you want.  Something like

    Dim converted As String

    converted = TextBox1.Text.ToUpper


  • Primate

    Use the ">" mask character.  Such as:

     

    Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Me.MaskedTextBox1.Mask = ">AAAAAAAAAAAAAAAAAAAAAAA"

    End Sub

    End Class


  • Mark Sargent

  • Zahid Younas

  • Asheesh

    Just to be clear, are we talking about a TextBox with a mask or a MaskedTextBox  

    The ">" character and others are described in the documentation for MaskedTextBox.Mask

    http://msdn2.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.mask.aspx

     On the other hand, a TextBox masked by something like TextBox1.PasswordChar = "*" has to be manually upcased as I described in my previous post.


  • EnterSB

    Ok Ed, thanks for the help. About the ">" character I didn’t know nothing. Where can I get help about character for formatting the mask In the MSDN express I could not find nothing about this.

    Thanks

    Jose Eloy
    Mexico

  • utterplush

    Ok. guys. Thanks for the help. Finally I can found the help about the mask characters.

    Jose Eloy
    Mexico


  • making a letter uppercase