I would look at this SO question . There are good answers there. The Marek Grzenkowicz CodeProject article contains some information about the TextBox unit testing that he developed.
Edit:
Testing the user interface can be a problem, and I try to pull as much as possible out of the user interface and translate it into a more tested class. Obviously, you want your unit tests to run without any user interaction, so if your class method accepts an input string and formats it, you can write a test (using NUnit, MS Test, etc.) For ensure input and check the actual result for expected results.
NUnit , , . Visual Studio Test- > New Test.... , VS 2008 Professional , .
, SO NUnit. .