private void txtVaInt_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyChar == 3) || (e.KeyChar == 24) || (e.KeyChar == 22))
{
return;
}
if ((e.KeyChar < 48 || e.KeyChar > 57) && e.KeyChar != 8 && e.KeyChar != 13 && e.KeyChar != 45)
{
e.Handled = true;
}
if (e.KeyChar == 45 && (((TextBox)sender).SelectionStart != 0 || ((TextBox)sender).Text.IndexOf("-") >= 0))
{
e.Handled = true;
}
if (e.KeyChar == 48 && (((TextBox)sender).SelectionStart == 0))
{
e.Handled = true;
}
}