I want to set my textbox to be able to only accept numeric values as well as a '.', I typed this code in
private void ipAddTextBox_KeyPress(object sender, KeyPressEventArgs e)
{
int isNum = 0;
if (e.KeyChar == ".")
e.Handled = false;
else if (!int.TryParse(e.KeyChar.ToString(), out isNum))
e.Handled = true;
but there's an error telling me that "The type or namespace name 'KeyPressEventArgs' could not be found"
anyone has any idea why this is happening and how i can solve this problem?
Thanks.