VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Numeric Text box Control, without creating OCX - Defect Fixed Code

by Gehan Fernando (47 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Sun 3rd April 2011
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Numeric Text box Control, without creating OCX - Defect Fixed Code

API Declarations


' Add Text box Control
' Added Following code for the Key-press event

' For More Refer Following URL
' http://www.syncfusion.com/faq/windowsforms/faq_c94c.aspx
' http://www.java2s.com/Tutorial/VB/0260__GUI/DisableTextBoxContextMenu.htm

Rate Numeric Text box Control, without creating OCX - Defect Fixed Code




If Char.IsDigit(digit) Or digit = ChrW(Keys.Back) Then
   e.Handled = False
Else
   If TextBoxNumeric.Text.Contains(".") = True Then
      e.Handled = True
   Else
      If Char.IsLetter(digit) Or Char.IsWhiteSpace(digit) Then
         e.Handled = True
   Else
         e.Handled = False
      End If

   End If
End If

Download this snippet    Add to My Saved Code

Numeric Text box Control, without creating OCX - Defect Fixed Code Comments

No comments have been posted about Numeric Text box Control, without creating OCX - Defect Fixed Code. Why not be the first to post a comment about Numeric Text box Control, without creating OCX - Defect Fixed Code.

Post your comment

Subject:
Message:
0/1000 characters