oh god... you people are lazy and don't really feel like learning. You guys get scared with some theory on how to do it, instead of just coder ready to use. There you go..
[highlight=C#]
if (e.KeyChar >= 48 && e.KeyChar <= 57)
e.Handled = false;
else if(e.KeyChar == 8)
e.Handled = false;
else
e.Handled = true;
[/highlight]
That's C#, you should be able to write such simple things. (Same .NET so..)
Sorry about C#, it's faster for me.
This will just let you press 0-9 and backspace to delete. Use it on Textbox Keypress event. And try it yourself next time instead of just ignoring what people tells you.