'Usage : On KeyPress Event we Can call the function to Validate the Text Box.
'Parameter : Textbox & KeyPressEventArgs
'Output : It Handels when Dot entered 2 time in the text box
Shared Sub ChkDot(ByVal ctxt As TextBox, ByVal x As System.Windows.Forms.KeyPressEventArgs)
If (Char.IsControl(x.KeyChar) Or Char.IsDigit(x.KeyChar) = True) Or x.KeyChar = "." Then
If ctxt.Text.IndexOf(".") <> -1 And x.KeyChar = "." Then
x.Handled = True
End If
Else
x.Handled = True
End If
End Sub