WANTED: Winforms Recipes

Having spent the best part of 7 years working in C# Winforms, it’s still not 100% clear which is the best way to handle a user’s interaction with a humble TextBox. The .Net framework offers many events that can be used to manage behaviour, but I’ve never seen any documentation stating the “Best way” or the “Right way” to do it.

Take for example a simple interaction. I have a simple textbox, and would like to perform an action once the user has typed the value and hit [Enter]. Which event should I use ? Validated, Validating, KeyPress, Leave ?

I know it all depends upon the exact scenario, but hey, Microsoft, throw us a bone!


Leave a comment

Filed under C#, UI Hints, Winforms

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s