is there a masked text box control specifically written in VB.NET along with the source code? I'd like to get my hands on it and learn how it works. I saw the one written in c++ on codeproject.com but I don't have that language installed (or know a lot about it)
This might be a sneaky way of doing it, but it seems to work. Of course it is far from perfect, but it can proabably be played with a bit by the experts to come up with a relatively simple solution. See the attached zip file.
Basically, there are two textboxs (1 and 2). textbox2 is disabled at startup and is on top of textbox1. When textbox1's text changes then the below occurs. Of course, you don't get the blinking cursor in textbox2 so the user doesn't know they are there, but you can click in textbox2 and backspace and you can highlight the phone number (although you do not see it) and backspace and retype it. Like it said it might could be played with.
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim AreaCode As String
Dim Prefix As String
Dim LastFour As String
'Phone number format = (555) 555-5555
For i = 1 To 3
AreaCode = Mid(TextBox1.Text, 1, i)
Next i
For j = 1 To 3
Prefix = Mid(TextBox1.Text, 4, j)
Next j
For k = 1 To 4
LastFour = Mid(TextBox1.Text, 7, k)
Next k
Got it. Maybe I will be able to do things like that one day.
I right-clicked on the TooBox - Browsed for the validtext.dll under the .NET Component tab and added it. After confirming it was there and in the Toolbox, I ran the project and was then able to change the properties of MaskEdit to (###) ###-####