private void edtCodMun_KeyPress(object sender, KeyPressEventArgs e) { if (!char.IsDigit(e.KeyChar)) e.Handled = true; }