Dear All,
I am trying to develope a Numeric text control box as follows.But this not working properly.Can somebody help.
VB Code:
Public Class NumericTextboxControl Inherits System.Windows.Forms.TextBox Private _Handled As Boolean = False Protected Overrides Function IsInputkey(ByVal Keychar As System.Windows.Forms.Keys) As Boolean Select Case Keychar Case Keys.NumPad0 To Keys.NumPad9 'Allow Numberpad 0-9 Return _Handled = True Case Keys.Back 'Allow Backspace key Return _Handled = True Case Keys.D0 To Keys.D9 'Allow Decimal 0-9 Return _Handled = True Case Else Return _Handled = False End Select End Function Public Property Handled() As Boolean Get Return _Handled End Get Set(ByVal value As Boolean) _Handled = False End Set End Property End Class




Reply With Quote