Results 1 to 5 of 5

Thread: [RESOLVED] [2005] Forcing Uppser Case in a text box

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Posts
    250

    Resolved [RESOLVED] [2005] Forcing Uppser Case in a text box

    Hi Everyone,

    How do you force all text being inputed (by a user) into a text box to be uppercase?
    Last edited by Giraffe Frenzy; Jun 5th, 2007 at 07:23 AM.

  2. #2
    Fanatic Member
    Join Date
    Feb 2007
    Location
    Eindhoven
    Posts
    828

    Re: [2005] Forcing Uppser Case in a text box

    vb Code:
    1. private sub myTextBox_KeyUp(sender as object, e as KeyEventArgs)
    2.   myTextbox.text = myTextBox.Text.toUpper()
    3. end sub
    Note that in case of control & paste the text in the textbox won't be converted.
    To do so , write the line in the above sub in the textChangedged event of the textbox

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Posts
    250

    Re: [2005] Forcing Uppser Case in a text box

    Hi talkro,

    I entered your code, but now when I enter data into the text box the data is being entered reversed.

  4. #4
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718

    Re: [2005] Forcing Uppser Case in a text box

    Set the CharacterCasing property of the textbox to Upper.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Posts
    250

    Re: [2005] Forcing Uppser Case in a text box

    oh cool. Thanks Ideas Man. That is even better. Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width