Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Tue, 17 Jan 2006 07:23:45 -0800,    group: microsoft.public.vstudio.helpauthoring        back       


How to put number only in textbox?   
I use VB.NET 2003 .
I want use Textbox Control From for put number of telephone. 
But how I code for put number no char?

Thank you.

If I wrong post for group , please guide.
date: Tue, 17 Jan 2006 07:23:45 -0800   author:   Vasant

Re: How to put number only in textbox?   
Hello Vasant,

> I use VB.NET 2003 .
> I want use Textbox Control From for put number of telephone.
> But how I code for put number no char?

well first of all this newsgroup is for Help Authoring, meaning the Help files
associated with an application.

Try to use "IsNumeric" or regular expressions to check your input.

IfNumeric(Me.txtNumber.Text) = False Then
   MessageBox.Show("No number.")
endif

Download a example to provide ErrorProviders in your programm from:
see:
http://www.help-info.de/en/Visual_Basic_net/vbnet_errorprovider.htm
download:
http://www.help-info.de/en/Visual_Basic_net/vbnet.htm

HTH

Best regards
Ulrich Kulle
*******************************************
http://www.help-info.de
*******************************************
date: Wed, 18 Jan 2006 09:02:11 +0100   author:   Ulrich Kulle infoREMOVE##

Re: How to put number only in textbox?   
Hello Vasant,

> I want use Textbox Control From for put number of telephone.
> But how I code for put number no char?

a appendix to my post from this morning:

Private Sub txtPhone_KeyPress(ByVal sender As _
Object, ByVal e As _
System.Windows.Forms.KeyPressEventArgs) _
Handles txtPhone.KeyPress
Select Case Asc(e.KeyChar.ToString)
   Case Is < Asc("0")
      e.Handled() = True
   Case Is > Asc("9")
      e.Handled() = True
   Case Else
      e.Handled() = False
   End Select
End Sub


Best regards
Ulrich Kulle
*******************************************
http://www.help-info.de
*******************************************
date: Wed, 18 Jan 2006 21:34:07 +0100   author:   Ulrich Kulle infoREMOVE##

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us