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.
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 *******************************************
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 *******************************************