I have made a vb.net form that has 3 text boxes and a button called Calculate. All I want to do is enter some values to the textboxes and click the button which calculates the numbers. I have done the calculation coding part.
Now I want to enter only numbers to the textboxes and if I enter alphabetics or symbols I need to get an critical error message with ok button when I click the ok button.
How can I do this?
You can use
Int32.TryParse(orDouble.TryParse) to check if the entered number is an integer (or double, with decimal places).MessageBox.ShowMethod