Yep, depends on the language.
Like I've said, it's programming, so there's usually multiple ways of doing things. It all depends on the language, your needs, how creative you are, and how much work you want to do.
Off the top of my head:
1) Readonly flag if it is there. Sometimes this lets them type in the box though (it isn't saved, but it might not be what is desired)
2) Enabled flag (it'll still show the text, greyed out, but you can't type anything in it)
3) Keypress type events on the textbox (if any letters or numbers are typed in the box, ignore it)
4) OnExit type events on the textbox (reset value of the box back to the original value)
5) Keypress type events on the form (identify what box has focus, if it is the one in question, ignore the letters/numbers)
And so on. Different ways of doing it, each with their own pros and cons.