Moze i ovako (real time resenje), uz pomoc KeyPress dogadjaja:
Code:
private void txtJMBG_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyChar < 48 || e.KeyChar > 57) && (e.KeyChar != 8))
e.Handled = true;
}
Pre ovog e.Handled mozes da dodas MessageBox da ti opomene korisnika :)
Shoot for the moon. Even if you miss, you'll land among the stars.
Les Brown