473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

MaskEditControl

Good Day Group,

I have a MaskEdit control to show phone in (###)###-####. I'm
trying to extract number only from the maskedit
control. For example, maskedit shows this (123) 456-7890 and would
like to get only 1234567890 with out the space and chars. I tried
substring and would like to know is there any other function in
vb.net? Thanks in advance.

Ian

Oct 29 '07 #1
2 1899
Dim s As String = "(123)456-7890"
MsgBox(s.Remove(8, 1).Remove(4, 1).Remove(0, 1))

hah~
<in*****@hotmail.comwrote in message
news:11**********************@q5g2000prf.googlegro ups.com...
Good Day Group,

I have a MaskEdit control to show phone in (###)###-####. I'm
trying to extract number only from the maskedit
control. For example, maskedit shows this (123) 456-7890 and would
like to get only 1234567890 with out the space and chars. I tried
substring and would like to know is there any other function in
vb.net? Thanks in advance.

Ian
Oct 29 '07 #2
Rob
Change the TextMaskFormat property to ExcludePromptAndLiterals

MaskedTextBox1.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals

Thanks, Rob

<in*****@hotmail.comwrote in message
news:11**********************@q5g2000prf.googlegro ups.com...
Good Day Group,

I have a MaskEdit control to show phone in (###)###-####. I'm
trying to extract number only from the maskedit
control. For example, maskedit shows this (123) 456-7890 and would
like to get only 1234567890 with out the space and chars. I tried
substring and would like to know is there any other function in
vb.net? Thanks in advance.

Ian

Oct 30 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.