how to control textbox type to double in visual basic?
I'd like to make a textbox that accepts only numbers, but not integer, but rather double.
I've read here aboute.Handled = Not Char.IsDigit(e.KeyChar) and it works, but again, it can be used only for integer, since it declines decimal point.
Another thing I've read here is If Not开发者_运维技巧 Double.TryParse(TextBox2.Text, value) Then .... and it would work fine, except that it allows only decimal comma instead of point. I don't know whether it's because of my location settings (Hungary, we use commas instead of points), but I don't have any other idea how to solve my problem, and the SQL server I send my data uses decimal point.
Thanks in advance.
Pass CultureInfo.InvariantCulture to TryParse.
加载中,请稍侯......
精彩评论