Home All Groups Group Topic Archive Search About
Author
27 Mar 2005 4:29 AM
patang
I want to restrict users to enter only numbers in a textbox control. I have
written a code in keypress to prevent user to enter other than numeric values.

I have also read many places that I can use MaskedEdit Control. My questions
is why can't I see this control in my Toolbox just like I can see other
controls like textbox, radio button etc.

Thanks.

Author
27 Mar 2005 4:35 AM
Ken Tucker [MVP]
Hi,

        VB.NET doesnt come with one.  Here are a few free ones

http://www.codeproject.com/vb/net/cpflexmaskeditbox.asp

http://www.codeproject.com/useritems/MaskedTextBox.asp

Ken
-----------------
"patang" <pat***@discussions.microsoft.com> wrote in message
news:19FFED88-629C-4F1E-964D-8AB90B9CBF69@microsoft.com...
I want to restrict users to enter only numbers in a textbox control. I have
written a code in keypress to prevent user to enter other than numeric
values.

I have also read many places that I can use MaskedEdit Control. My questions
is why can't I see this control in my Toolbox just like I can see other
controls like textbox, radio button etc.

Thanks.
Author
27 Mar 2005 11:22 AM
Herfried K. Wagner [MVP]
"patang" <pat***@discussions.microsoft.com> schrieb:
>I want to restrict users to enter only numbers in a textbox control. I have
> written a code in keypress to prevent user to enter other than numeric
> values.

<URL:http://www.codeproject.com/cs/miscctrl/maskedcsedit.asp>
<URL:http://www.codeproject.com/vb/net/maskedbox_control.asp>
<URL:http://www.codeproject.com/vb/net/validtext3.asp>
<URL:http://www.codeproject.com/vb/net/cpflexmaskeditbox.asp>
<URL:http://www.codeproject.com/useritems/ValidText.asp>
....

..NET 2.0 will contain a masked edit control.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
27 Mar 2005 2:49 PM
J L
Check out this link

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/vbnet04082003.asp

John

On Sun, 27 Mar 2005 13:22:15 +0200, "Herfried K. Wagner [MVP]"
<hirf-spam-me-here@gmx.at> wrote:

Show quoteHide quote
>"patang" <pat***@discussions.microsoft.com> schrieb:
>>I want to restrict users to enter only numbers in a textbox control. I have
>> written a code in keypress to prevent user to enter other than numeric
>> values.
>
><URL:http://www.codeproject.com/cs/miscctrl/maskedcsedit.asp>
><URL:http://www.codeproject.com/vb/net/maskedbox_control.asp>
><URL:http://www.codeproject.com/vb/net/validtext3.asp>
><URL:http://www.codeproject.com/vb/net/cpflexmaskeditbox.asp>
><URL:http://www.codeproject.com/useritems/ValidText.asp>
>...
>
>.NET 2.0 will contain a masked edit control.