Add dashes automatically

...or switch text boxes after so many characters entered

Page 1 of 1

1 Replies - 5892 Views - Last Post: 31 March 2010 - 09:51 PM Rate Topic: -----

#1 swelzba9  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 29-November 09

Add dashes automatically

Posted 31 March 2010 - 08:54 PM

I have searched on google and asked friends, but have not figured out a way to add dashes while a user is typing either a phone number or a social security number or something of the like. I am using Visual Studio 2008, VB Windows Form. This is not for homework but I enjoy adding things to certain projects and thought this would be neat to incorporate into one of mine. I am also curious about allowing the user to enter the first three numbers for their area code and then send the focus to the next text box so that the user can type the rest of their number. I was thinking I could do something with the text box text entered event procedure where I would send the focus after three characters entered. Not 100% on the entire idea or if there is an easier way. Good day all and thanks for your help as always :-)

Is This A Good Question/Topic? 0
  • +

Replies To: Add dashes automatically

#2 n8wxs  Icon User is offline

  • --... ...-- -.. . -. ---.. .-- -..- ...
  • member icon

Reputation: 972
  • View blog
  • Posts: 3,878
  • Joined: 07-January 08

Re: Add dashes automatically

Posted 31 March 2010 - 09:51 PM

Have a look at MaskedTextBox Class and it's
MaskedTextBox.Mask Property
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1